This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Aliases for working with a hg-git enabled mercurial repository in .git/hg | |
[alias] | |
hg-dir = "!echo ${GIT_DIR:-.git}/hg" | |
hg-run = "!hg -R $(git hg-dir)" | |
hg-git-dir = "!echo $(git hg-dir)/.hg/git" | |
hg-git-branch = "!f() { [ \"$1\" = default ] && echo master || echo \"$1\"; }; f" | |
hg-update-bookmarks = "!git hg-run branches | while read branch rev rest; do target=$(git hg-git-branch $branch); rev=$(echo $rev | sed -r \"s/([0-9]+):.*/\\1/\"); git hg-run bookmark -f -r $rev $target; done" | |
hg-delete-bookmarks = "!git hg-run bookmarks | sed -r 's/[[:space:]]+(.+?)[[:space:]]+.*/\\1/' | xargs -n 1 git hg-run bookmark -d" | |
hg-hg2git = "!git hg-update-bookmarks && git hg-run gexport" | |
hg-git2hg = "!git hg-delete-bookmarks && git hg-run gimport" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
st = status --short --branch | |
dc = diff --cached -M -B -C | |
typo = commit --amend | |
fixup = commit --amend --no-edit | |
logk = log --graph --pretty=\"format:%C(yellow)%h%C(red)%d%Creset %s %C(green)%an, %ar%Creset\" | |
ffpull = pull --ff-only | |
ffmerge = merge --ff-only | |
ri = "!f() { rev=$(git rev-parse $1 2>/dev/null) || rev=HEAD~$1; git rebase -i $rev; }; f" | |
rc = rebase --continue |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* JavaScript progress bar | |
* | |
* Reads the percentage value from the content of an element and | |
* replaces it with a progress bar. | |
* | |
* Example: | |
* | |
* <span class="progress">100 %</span> | |
* <script> | |
* $('.progress').progressbar(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!bash | |
_sala() { | |
local IFS=$'\n' dir=${SALADIR:-.} cur | |
if ! type _get_comp_words_by_ref >/dev/null 2>&1; then | |
cur=${COMP_WORDS[$COMP_CWORD]} | |
else | |
_get_comp_words_by_ref cur | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create the repository with "git init --bare", then edit config to match this: | |
[core] | |
repositoryformatversion = 0 | |
filemode = true | |
bare = false | |
worktree = /path/to/worktree | |
[receive] | |
denycurrentbranch = ignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Search for statistic messages from the Python trakcer robot in | |
# python-dev archives and plot the result. | |
# | |
# $ python-traker-stats.py collect | |
# | |
# Collects statistics from the mailing list and saves to | |
# python-tracker-stats.json | |
# | |
# $ python-tracker-stats.py plot | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Open in browser when viewing interactively | |
text/html; /usr/bin/sensible-browser '%s'; description=HTML Text; nametemplate=%s.html | |
# Dump with w3cm and the correct encoding when viewing non-interactively | |
text/html; /usr/bin/w3m -dump -T text/html -I %{charset} -O utf-8 %s; copiousoutput; description=HTML Text; nametemplate=%s.html | |
# Support non-standard image/jpg, too | |
image/jpg; display 'jpeg:'%s''; test=test -n "$DISPLAY" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This hook is run after this virtualenv is activated. | |
export SALADIR=/path/to/passwords | |
. /path/to/sala/contrib/sala-completion.bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
==7657== Memcheck, a memory error detector | |
==7657== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al. | |
==7657== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info | |
==7657== Command: /usr/bin/Xorg :0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch -verbose 10 | |
==7657== | |
X.Org X Server 1.11.3 | |
Release Date: 2011-12-16 | |
X Protocol Version 11, Revision 0 | |
Build Operating System: Linux 2.6.42-26-generic x86_64 Ubuntu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
==20591== Memcheck, a memory error detector | |
==20591== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al. | |
==20591== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info | |
==20591== Command: /usr/bin/Xorg :1 -auth /var/run/lightdm/root/:1 -nolisten tcp vt7 -novtswitch -verbose 10 | |
==20591== | |
X.Org X Server 1.11.3 | |
Release Date: 2011-12-16 | |
X Protocol Version 11, Revision 0 | |
Build Operating System: Linux 3.2.0-27-generic x86_64 Ubuntu |