This file contains hidden or 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
# Shorten lengthy paths | |
PROMPT_COMMAND='DIR=`pwd|sed -e "s!$HOME!~!"`; if [ ${#DIR} -gt 30 ]; then CurDir=${DIR:0:12}...${DIR:${#DIR}-15}; else CurDir=$DIR; fi' | |
# Git status in prompt | |
function parse_git_dirty { | |
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*" | |
} | |
function parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/ [\1$(parse_git_dirty)]/" | |
} |
This file contains hidden or 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
/* | |
* 'Zenplate': a language/template-engine agnostic markup DSL | |
*/ | |
// extending a zenplate | |
extend -> 'base.zen' | |
// support for extending templates from other template engines | |
extend -> jinja 'base.j2' |
This file contains hidden or 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
doto = (object, operations...) -> | |
process = (operation) -> | |
for method, arguments of operation | |
# Additional fancy nonsense to keep things DRY | |
if method is 'repeatedly' | |
[method, arguments] = [name,args] for name, args of arguments | |
operation = {} | |
for argument in arguments | |
operation["#{method}"] = argument | |
process operation |
This file contains hidden or 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
load_paths.unshift("chrome://conkeror-contrib/content/"); | |
mode_line_mode(false); | |
// Disables security checking for FF extensions | |
session_pref("xpinstall.whitelist.required", false); | |
require("clicks-in-new-buffer.js"); | |
clicks_in_new_buffer_target = OPEN_NEW_BUFFER_BACKGROUND; | |
clicks_in_new_buffer_button = 1; |
This file contains hidden or 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
;;;; Custom color theme | |
(defun color-theme-tangotango () | |
"A color theme based on Tango Palette colors." | |
;; Color codes : | |
;; - blue : "dodger blue" | |
;; - yellow : "#edd400" | |
;; - green : "#6ac214" | |
;; - orange/red : "tomato" | |
(interactive) | |
(color-theme-install |
This file contains hidden or 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
# Be sure to place this script in the directory where you wish to install Clojure | |
sudo apt-get install sun-java6-jdk ant git | |
echo 'JAVA_HOME="/usr/lib/jvm/java-6-sun/" && export JAVA_HOME' >> ~/.profile | |
source ~/.profile | |
git clone https://github.com/clojure/clojure.git && cd clojure && ant | |
echo "java -cp `pwd`/clojure.jar clojure.main $@" > clojure | |
chmod +x clojure && sudo ln -s `pwd`/clojure /usr/bin/clojure |
This file contains hidden or 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
from os.path import abspath, isfile | |
import sys | |
def expand(filename): | |
"Expands minified Javascript/CSS files." | |
filename = abspath(filename) | |
is_js = filename.endswith(".js") | |
is_css = filename.endswith(".css") | |
assert isfile(filename) and (is_js or is_css), "Invalid File" |
This file contains hidden or 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
echo "PATH=\"$1:\$PATH\" && export PATH" >> ~/.profile | |
source ~/.profile |
This file contains hidden or 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 Ubuntu: }-------------------------------------------------- | |
# Admin | |
alias update="sudo aptitude update ; sudo aptitude -ZWry safe-upgrade && sudo aptitude -ZWry --purge-unused clean" | |
alias sources="sudo nano /etc/apt/sources.list" | |
alias install="sudo aptitude -ZWry install" | |
alias uninstall="sudo aptitude -ZWry remove" | |
alias pkgsearch="aptitude search" | |
alias installed="dpkg --get-selections | grep" | |
alias add-repo="sudo add-apt-repository" | |
alias app="apropos" |
NewerOlder