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
#!/usr/bin/env python | |
import mailbox | |
mailbox_root = 'your_mailbox' | |
mailbox_type = mailbox.Maildir | |
########################################### | |
########################################### | |
## Configuration section finished. ## |
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
{polymorphic} = require 'polymorphic' | |
class OtherModel extends Backbone.Model | |
class YetAnotherOtherModel extends Backbone.Model | |
class MyModel extends Backbone.Model | |
relations: [ | |
type: Backbone.One | |
key: 'otherUri' |
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
#!/usr/bin/env sh | |
fail() { | |
echo "Failed to authenticate as superuser." | |
exit | |
} | |
# Verify that we have privileges or fail | |
test sudo || fail |
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
from .utils import template | |
x = template('example.sh', '~', options='-al') |
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 | |
source /etc/bash_completion.d/git | |
# Any directories that should additionally be treated as prefixes. | |
additional_prefixes=( | |
"/usr/local" | |
"${HOME}" | |
) |
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
# Toggle between play/pause | |
"nyxmms2 toggle" | |
m:0x0 + c:172 | |
XF86AudioPlay | |
# Increase volume | |
"amixer set Master playback 3+" | |
m:0x0 + c:123 | |
XF86AudioRaiseVolume |
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 | |
# An additional script that will execute for wm-specific configuration | |
wm_init_script = "${HOME}/.config/${1}/init.sh" | |
# Execute the window manager and save it's pid for later | |
exec $1 & | |
wm_pid = $! | |
# A bit of a time gap for the window manager to get started. |
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
attr = 0 | |
something = (x) -> | |
attr = x | |
something 40 | |
console.dir attr | |
# Output: 40 |
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
require 'formula' | |
class Vim < Formula | |
homepage 'http://www.vim.org/' | |
url 'ftp://ftp.vim.org/pub/vim/unix/vim-7.3.tar.bz2' | |
head 'https://vim.googlecode.com/hg/' | |
sha256 '5c5d5d6e07f1bbc49b6fe3906ff8a7e39b049928b68195b38e3e3d347100221d' | |
version '7.3.294' | |
def features; %w(tiny small normal big huge) end |
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
# Thanks to @kroogs for the idea of making the text red on errors :D | |
# This is a global reference to be used in order to know the last return | |
# code from within functions. | |
last_response_code=$? | |
# Formats the provided text into something a bit more striking. | |
error_text () { echo "\033[31m${@}\033[0m"; } | |
# Generates our PS1 when passed the last program's response code, and |