2018 Nissan Leaf

Specifications for the 2018 model Leaf have been available for a few months now and the most commented spec is the 150 mile range. All things being equal, more range is better. I predict that with competition like the 230 mile Bolt, Nissan will have a tough time selling the Leaf. But all things aren’t equal and a glance at the graph below demonstrates the unique niche that the Leaf will occupy:

chart.png

Range isn’t everything. Recalculating the above data would show Nissan on top using the miles-of-range per dollar cost metric. Currently in New England, long distance driving is not ready for prime time given the lack of high speed superchargers in convenient locations (highway rest stops). The main use case for a Leaf is commuting. If you can commute to work daily on a single charge, charging overnight at home, then you have the range you need. For a 2018 Leaf this would be about a 60 mile one way commute, good enough for most people. Advantages of a smaller (40KW) battery are less weight so better acceleration, less intrusion on interior space, and lower cost. Another unappreciated limitation of home (240V) charging is you can only recover about 180 miles of charge overnight, so battery capacity in excess of about 200 miles can not be utilized on a day to day basis.

Having owned the Leaf for a year and ~5000 miles now, I have yet to spend a penny on maintenance or repairs.

Some of my other posts on the Leaf:

Share

Electrum

Password unlocks the wallet
Seed recovers the predetermined public/private key combinations

Problems with Qt client use text:
electrum -g text restore

Start the litecoin client from a prompt:
$electrum-ltc

Share

Git

Git glossary

Git reference guide

Share

Google

Tips from Jim

Add the following to your hosts file:

127.0.0.1 googlesyndication.com
127.0.0.1 tpc.googlesyndication.com
127.0.0.1 doubleclick.net
127.0.0.1 g.doubleclick.net
127.0.0.1 googleads.g.doubleclick.net
127.0.0.1 www.google-analytics.com
127.0.0.1 ssl.google-analytics.com
127.0.0.1 google-analytics.com
127.0.0.1 www.onclickmax.com

Turn off Thunderbird and Firefox’s routine tattling.

Mozilla Firefox

Type ‘about:config’ in the address bar
Click through the warning
Type ‘geo.’ in the search box. A list of items appears
Doubleclick on the geo.enabled item till it reads ‘False’
Change the two strings to ‘http://localhost’
Change the timeout to 1

Mozilla Thunderbird

Select Tools/Options/Avanced/General/Config Editor
click through the warning
type ‘geo.’ in the search box. A list of items appears
set the timeout to one, and the url to ‘http://localhost’

Don’t use google accounts

Some alternatives:

Twitter –> Gab

Facebook –> Akasha

Search –> DuckDuckGo

Mail –> Disroot, Tutanota

Share

Clojure

Leiningen

Download ~/bin/lein.bat and run to setup. lein.bat has a variable to indicate the version being used. This can be changed to up/downgrade. Keep old versions of clojure should an upgrade break things.

~/.m2 contains the repository.

cd into the project directory and $lein deps to install/upgrade dependencies.

run lein clean occasionally
lein clean - delete build artifacts
lein deps - download dependencies, including clojure
lein javac - compile java code in project

Clojure

Clojure-mode

Cider

Init.el

(require ‘cider)

;;from: http://blog.jenkster.com/2013/12/a-cider-excursion.html

(defun cider-namespace-refresh ()
(interactive)
(cider-interactive-eval
“(require ‘clojure.tools.namespace.repl)
(clojure.tools.namespace.repl/refresh)”))

;;also see http://thinkrelevance.com/blog/2013/06/04/clojure-workflow-reloaded

(define-key clojure-mode-map (kbd “M-r”) ‘cider-namespace-refresh)

Share

Crooked Hillary

Breitbart does a great job highlighting their articles concerning the demented one with images that reveal her true disposition. All images lifted from Breitbart.com:

Deranged…

Possessed…

Pissed…

Demented…

Nut case…

Constipated…

Confused…

Bat Crazy…

Fake…

Share

SQLite

Download and unzip SQLITE into a directory. I used c:\program files\sqlite3. This path will need to be referred to as c:\progra~1\sqlite3 in your lisp code and any batch files. Be sure to also download the associated executable file, which provides about 27 “dot” utility commands. Test that the systems works by creating a table and populating with data. To get started, create a batch file that starts SQLITE with the database name of interest, which is passed to the executable as a parameter. To create the database named “mydb”, the contents of sqlite.bat would be:

1
c:\progra~1\sqlite\sqlite3.exe mydb

At the sqlite prompt both dot and SQL commands can be submitted. To retain a record of the commands used to create your database, place them in a plain text file and then use the .read command to read that file into SQLITE. Here are the contents of my “create-tables.txt” file:

1
2
3
4
5
6
7
8
9
10
11
CREATE TABLE ab (
ab_id INTEGER PRIMARY KEY AUTOINCREMENT,
names varchar(20),
antigen_species char(20),
host char(20),
supplier varchar(20),
catnum varchar(20),
isotype char(20),
specificity varchar(20),
application varchar(20),
epitope varchar(20));

To execute, read in create-tables.txt at the sqlite prompt:

1
sqlite> .read "create-tables.txt"

You can check that the table was created with the .schema command. Next insert a value. Either type it directly at the sqlite prompt, or read it from a file.

1
INSERT INTO ab VALUES ( NULL,'Tau 46', 'human', 'mouse', 'Santa Cruz', 'sc-32274', 'IgG1', 'hu;mu;rat', 'western;ip;if','unknown');

And query it out:

1
sqlite> SELECT * FROM ab;

If you retrieve your row, you are all set to move on. Note that the assigned value of ab_id is NULL. Let the database assign the autoincrement field.

init.el

;;__
;;;; Programming - SQLite

(add-hook ‘sql-mode-hook
‘(lambda ()
(interactive)
(sql-set-product ‘sqlite)
(sql-product-interactive sql-product)
;;(sql-connect-preset ‘pool-a))
(define-key sql-mode-map [f5] ‘sql-send-region)
(define-key sql-mode-map [f4] ‘sql-send-buffer)))

;;(add-hook ‘sql-interactive-mode-hook
;; )

;;(add-hook ‘sql-set-sqli-hook
;;Hook for reacting to changes of sql-buffer
;; (setq sql-database “~/owncloud/misc/pm/pm.sqlite”)
;; )

(setq sql-connection-alist
‘((pool-a
(sql-product ‘sqlite)
(sql-server “1.2.3.4”)
(sql-user “me”)
(sql-password “mypassword”)
(sql-database “~/syncd/prog/plate-manager/pm.sqlite”))))

(defun sql-connect-preset (name)
“Connect to a predefined SQL connection listed in sql-connection-alist'" (eval(let ,(cdr (assoc name sql-connection-alist))
(flet ((sql-get-login (&rest what)))
(sql-product-interactive sql-product)))))

;; (add-hook ‘sql-interactive-mode-hook ‘my-sql-save-history-hook)

Share