#Mac OS X
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
*.txt |
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 | |
# | |
# Create a RAM Disk in Mac OS X 10.5, 10.6, 10.7 or later. | |
# To remove the RAM disk, simply eject it from the desktop | |
# as you would any other disk. | |
# | |
# http://osxdaily.com/2007/03/23/create-a-ram-disk-in-mac-os-x/ | |
if [ -z "$1" ]; then | |
echo Usage: $0 SIZE_IN_MB |
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
# ~/.osx — http://mths.be/osx | |
############################################################################### | |
# General UI/UX # | |
############################################################################### | |
# Set computer name (as done via System Preferences → Sharing) | |
scutil --set ComputerName "MathBook Pro" | |
scutil --set HostName "MathBook Pro" | |
scutil --set LocalHostName "MathBook-Pro" |
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 "rubygems" | |
require "mechanize" | |
site = 'http://pi:9094/home/postprocess/' | |
user = 'xbian' | |
pass = 'raspberry' | |
downloads = '/home/xbian/downloads/tv' | |
agent = Mechanize.new |
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 | |
# fail on error | |
set -e | |
pushd `dirname $0` > /dev/null | |
SCRIPT=`pwd -P` | |
popd > /dev/null | |
KEEP_DAYS=150 |
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
common::jailuser { 'nova': | |
sections => ['jk_lsh', 'basicshell'], | |
binds => ['/var/log => log', '/opt => opt'], | |
keys => ['funky', 'george'], | |
} | |
define common::jailuser( | |
$user = $title, | |
$sections = [], |
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
// Protect the '$' alias and add scope by putting everything in | |
// an Immediately Invoked Function Expression: | |
// http://stage.learn.jquery.com/javascript-101/functions/#immediately-invoked-function-expression-iife | |
(function($) { | |
// As $.fn is just an alias for $.prototype, all jQuery | |
// objects ($ constructor) get our function. | |
$.fn.helloWorld = function(options) { | |
debug(this); |
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
/** | |
paste this code into a playground to test it out | |
*/ | |
import Foundation | |
/** | |