start new:
tmux
start new with session name:
tmux new -s myname
python3 -c 'import sys, yaml, json; y=yaml.safe_load(sys.stdin.read()); print(json.dumps(y))' |
(defun pp-macroexpand () | |
(interactive) | |
(save-excursion | |
(pp-macroexpand-expression (read (current-buffer))))) | |
(dolist (map (list lisp-interaction-mode-map emacs-lisp-mode-map)) | |
(define-key map (kbd "C-c RET") 'pp-macroexpand)) | |
(when (featurep 'popwin) | |
(push '("*Pp Macroexpand Output*" :noselect t) popwin:special-display-config)) |
@Before | |
public void setup() { | |
SecurityContextHolder.getContext().setAuthentication( | |
new UsernamePasswordAuthenticationToken(username, password)); | |
} |
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git@github.com:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
#!/usr/bin/ruby | |
# Convert a Markdown README to HTML with Github Flavored Markdown | |
# Github and Pygments styles are included in the output | |
# | |
# Requirements: json gem (`gem install json`) | |
# | |
# Input: STDIN or filename | |
# Output: STDOUT | |
# Arguments: "-c" to copy to clipboard (or "| pbcopy"), or "> filename.html" to output to a file | |
# cat README.md | flavor > README.html |
#!/bin/bash | |
#set -x | |
doInstall() { | |
ECLIPSELOCATION=`ls $LOCATION/plugins/org.eclipse.equinox.launcher_*` | |
$JAVA_HOME/bin/java -jar $ECLIPSELOCATION -nosplash -application org.eclipse.equinox.p2.director \ | |
-metadataRepository "$2" \ | |
-artifactRepository "$2" \ | |
-destination $LOCATION \ | |
-installIU "$1" |
Either copy the aliases from the .gitconfig
or run the commands in add-pr-alias.sh
Easily checkout local copies of pull requests from remotes:
git pr 4
- creates local branch pr/4
from the github upstream
(if it exists) or origin
remote and checks it outgit pr 4 someremote
- creates local branch pr/4
from someremote
remote and checks it outif ::ActiveRecord::Base.connection_config[:adapter] == 'sqlite3' | |
if c = ::ActiveRecord::Base.connection | |
# see http://www.sqlite.org/pragma.html for details | |
# Page size of the database. The page size must be a power of two between 512 and 65536 inclusive | |
c.execute 'PRAGMA main.page_size=4096;' | |
# Suggested maximum number of database disk pages that SQLite will hold in memory at once per open database file | |
c.execute 'PRAGMA main.cache_size=10000;' |