Motion, keyboard commands and shortcuts for VI Improved
" Specify a directory for plugins | |
call plug#begin('~/.vim/plugged') | |
Plug 'neoclide/coc.nvim', {'branch': 'release'} | |
Plug 'scrooloose/nerdtree' | |
"Plug 'tsony-tsonev/nerdtree-git-plugin' | |
Plug 'Xuyuanp/nerdtree-git-plugin' | |
Plug 'tiagofumo/vim-nerdtree-syntax-highlight' | |
Plug 'ryanoasis/vim-devicons' | |
Plug 'airblade/vim-gitgutter' |
""" | |
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy) | |
BSD License | |
""" | |
import numpy as np | |
# data I/O | |
data = open('input.txt', 'r').read() # should be simple plain text file | |
chars = list(set(data)) | |
data_size, vocab_size = len(data), len(chars) |
Let's have some command-line fun with curl, [jq][1], and the [new GitHub Search API][2].
Today we're looking for:
- node.js
- Installation paths: use one of these techniques to install node and npm without having to sudo.
- Node.js HOWTO: Install Node+NPM as user (not root) under Unix OSes
- Felix's Node.js Guide
- Creating a REST API using Node.js, Express, and MongoDB
- Node Cellar Sample Application with Backbone.js, Twitter Bootstrap, Node.js, Express, and MongoDB
- JavaScript Event Loop
- Node.js for PHP programmers
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
RubyConf 2011 | 2011-09-29 | Gregory Moeck (@gregmoeck) | Slides
- Recommended as the best book on mocks: Growing Object-Oriented Software, Guided by Tests by Steve Freeman & Nat Pryce
- Common arguments against mocks
- They duplicate implementation
- They lead to brittle tests
- Mock objects + procedural programming = bad idea
- If you're doing traditional Rails development (which tends to follow more of a "procedural", do-this-and-then-do-that style), mock objects probably aren't for you
# 5 Reasons You Should Use ri To Read Ruby Documentation | |
http://jstorimer.com/ri.html | |
http://samuelmullen.com/2012/01/up-and-running-with-ruby-interactive-ri/ | |
https://github.com/danchoi/ri.vim | |
## Make sure docs are generated for gems | |
In `~/.gemrc` |
https://www.facebook.com/notes/kent-beck/functional-tdd-a-clash-of-cultures/472392329460303
I have been taking Bryan O'Sullivan's excellent Haskell course and noticed something during the homework: TDD wasn't working for me, at least not as I apply it in object languages. This has forced me to take a step back and rethink what is really essential about TDD and what is an artifact of the languages I have been using.
A warning: I'm only on week two of the course. I did quite a bit of functional programming in the Dinosaur Computing Era, so the style is familiar, but everything contained herein is subject to change. I'm mostly just thinking aloud (and hoping for contributed wisdom.)
When I use TDD with an object language like Smalltalk, Java, or PHP I typically start programming with a trivial case--a List with no elements, for example. Working through it encourages me (sounds better than "forces") to think about the metaphors I am using and style of the API
# base64 encoding and decoding | |
Useful for decoding email message attachments | |
Source: http://superuser.com/questions/120796/os-x-base64-encode-via-command-line | |
## To decode from Base64 | |
openssl base64 -d -in <infile> -out <outfile> |