Side note: we use z-tables that require all of the values to be added by .5
-
Normal Distribution
# ~/.osx — http://mths.be/osx | |
# root check | |
if [[ $EUID -ne 0 ]]; then | |
echo "################################"; | |
echo "## YOU ARE NOT RUNNING AS ROOT #"; | |
echo "################################"; | |
echo "#"; | |
echo "# USAGE: sudo $0"; | |
exit; |
sudo -v | |
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist #disable spotlight | |
sudo chmod 600 /System/Library/CoreServices/Search.bundle/Contents/MacOS/Search #disable spotlight | |
defaults write -g ApplePressAndHoldEnabled -bool false #disable accent popup ?(maybe) | |
defaults write NSGlobalDomain KeyRepeat -int 0 #faster keyrepeat ?(maybe) | |
#defaults write com.apple.finder AppleShowAllFiles TRUE #show hidden files |
#!/usr/bin/env bash | |
# ~/.osx — http://mths.be/osx | |
# Ask for the administrator password upfront | |
sudo -v | |
# Keep-alive: update existing `sudo` time stamp until `.osx` has finished | |
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & |
/** | |
* Module dependencies. | |
*/ | |
var express = require('express') | |
, routes = require('./routes') | |
, http = require('http'); | |
var app = express(); | |
var server = app.listen(3000); |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 Jed Schmidt <http://jed.is> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
#! /usr/bin/env python | |
import fileinput | |
import argparse | |
from operator import itemgetter | |
parser = argparse.ArgumentParser() | |
parser.add_argument('--target-mb', action = 'store', dest = 'target_mb', default = 61000, type = int) | |
parser.add_argument('vmtouch_output_file', action = 'store', nargs = '+') | |
args = parser.parse_args() |
process.on('SIGINT', function() { | |
/* shutdown here */ | |
}) |
hdiutil convert -format UDRW -o ~/path/to/target.img ~/path/to/ubuntu.iso | |
mv ~/path/to/target.img.dmg ~/path/to/target.img #hdiutil likes dmgs... | |
sudo dd if=~/path/to/target.img of=/dev/rdisk{int} #must be disk and not partition for bootable |
Side note: we use z-tables that require all of the values to be added by .5
Normal Distribution
var express = require('express'); | |
var serveStatic = require('serve-static'); | |
var app = express(); | |
app.use('/static', serveStatic(__dirname + '/public')); | |
app.use('/bower_components', serveStatic(__dirname + '/bower_components')); | |
if (process.env.HTTP != null || process.env.PORT != null) { | |
port = process.env.HTTP || process.env.PORT; | |
console.log('Server started on port ' + port + ' at ' + new Date(Date.now())); | |
server = app.listen(port); | |
} else { |