gem install rails --pre
rails new my_app -T
# moved internal properties to arguments.callee so | |
# we don't have to worry about name collisions with our | |
# context. | |
tco = (fn) -> | |
(args...) -> | |
my = arguments.callee | |
my.recurred = false | |
my.args = [] |
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
========================================== ========================================== | |
TMUX COMMAND WINDOW (TAB) | |
========================================== ========================================== | |
List tmux ls List ^a w | |
New -s <session> Create ^a c | |
Attach att -t <session> Rename ^a , <name> | |
Rename rename-session -t <old> <new> Last ^a l (lower-L) | |
Kill kill-session -t <session> Close ^a & |
# xcode-build-bump.sh | |
# @desc Auto-increment the build number every time the project is run. | |
# @usage | |
# 1. Select: your Target in Xcode | |
# 2. Select: Build Phases Tab | |
# 3. Select: Add Build Phase -> Add Run Script | |
# 4. Paste code below in to new "Run Script" section | |
# 5. Drag the "Run Script" below "Link Binaries With Libraries" | |
# 6. Insure that your starting build number is set to a whole integer and not a float (e.g. 1, not 1.0) |
# Google Search for Pythonista (iOS) | |
# Searches Google and copies the first result to the clipboard as | |
# a Markdown link in the form [title](url). | |
# | |
# Inspired by Brett Terpstra's SearchLink: | |
# http://brettterpstra.com/searchlink-automated-markdown-linking-improved/ | |
import clipboard | |
def google(terms): |
#!/bin/bash | |
#parameters: | |
# $1 - mp4 url | |
# $2 - start time in format hh:mm:ss.mic | |
# $3 - duration in seconds | |
# $4 - text for gif overlay | |
# $5 - output file without extension | |
if [ "$#" -ne 5 ] | |
then | |
echo "Usage: gifenc.sh \$1 \$2 \$3 \$4 \$5 |
Answer by Jim Dennis on Stack Overflow question http://stackoverflow.com/questions/1218390/what-is-your-most-productive-shortcut-with-vim/1220118#1220118
Your problem with Vim is that you don't grok vi.
You mention cutting with yy and complain that you almost never want to cut whole lines. In fact programmers, editing source code, very often want to work on whole lines, ranges of lines and blocks of code. However, yy is only one of many way to yank text into the anonymous copy buffer (or "register" as it's called in vi).
The "Zen" of vi is that you're speaking a language. The initial y is a verb. The statement yy is a simple statement which is, essentially, an abbreviation for 0 y$:
0 go to the beginning of this line. y yank from here (up to where?)
Answer by Jim Dennis on Stack Overflow question http://stackoverflow.com/questions/1218390/what-is-your-most-productive-shortcut-with-vim/1220118#1220118
Your problem with Vim is that you don't grok vi.
You mention cutting with yy and complain that you almost never want to cut whole lines. In fact programmers, editing source code, very often want to work on whole lines, ranges of lines and blocks of code. However, yy is only one of many way to yank text into the anonymous copy buffer (or "register" as it's called in vi).
The "Zen" of vi is that you're speaking a language. The initial y is a verb. The statement yy is a simple statement which is, essentially, an abbreviation for 0 y$:
0 go to the beginning of this line. y yank from here (up to where?)
import xml.etree.ElementTree as ET | |
print(ET.tostring(client.history.last_sent['envelope'])) |