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
import Cocoa | |
extension Array { | |
func random() -> T { | |
var r = arc4random_uniform(UInt32(self.count)) | |
return self[Int(r)] | |
} | |
} | |
class SillyName { | |
let adjectives = ["Black", "White", "Gray", "Brown", "Red", "Pink", "Crimson", "Carnelian", "Orange", "Yellow", "Ivory", "Cream", "Green"] |
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 gdbnew='/usr/local/Cellar/gdb/7.6/bin/gdb' |
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
function parse_git_dirty | |
git diff --quiet HEAD ^&- | |
if test $status = 1 | |
echo (set_color $fish_git_dirty_color)"Δ"(set_color normal) | |
end | |
end | |
function parse_git_branch | |
# git branch outputs lines, the current branch is prefixed with a * | |
set -l branch (git rev-parse --abbrev-ref HEAD) |
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/sh | |
#################################### | |
# Output file for HTML5 video # | |
# Requirements: # | |
# - handbrakecli # | |
# - ffmpeg # | |
# - ffmpeg2theora # | |
# # | |
# usage: # |
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
/* | |
* Small hack I usually keep around, mainly use it like so (after placing it in my path) | |
* ./big_task_that_takes_a_while_to_run ; alert | |
* Once the task is done a small sound will be played letting you know its finished and you will no longer have to | |
* keep tabbing back to your console window to check if your process has finished or not. | |
* Released in public domain (all 5 rows of it) | |
*/ | |
#include <stdio.h> | |
int main(void) { |