#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
# Do these once | |
ifconfig en1 | grep ether > .macaddress #Save your real mac address somewhere | |
# Alias the airport adapter | |
sudo ln -s /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport /usr/sbin/airport | |
# Then each time you want to change MAC address: | |
airport -z #disconnect but don't turn off the airport | |
sudo ifconfig en1 ether 00:00:00:00:00:00 #set new mac address (perhaps just increment your old one) | |
ifconfig en1 | grep ether #check it's actually changed |
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
# Start and stop headless VMs | |
# put this on your path as save it as vm or vm.sh. | |
# no need to turn your vmware on when running on Mac | |
# just run as vm start and it will list all the available vm images. | |
# then choose which one you want to start. perfect for running Linux under OSX | |
# in headless mode for development | |
# Note:, some of this script is from gist (72638254422dc741b299) | |
# Some rework and enhancement to make it work better and handle windows | |
#!/bin/bash |
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
fs = require 'fs' | |
control = require 'control' | |
task = control.task | |
task "deploy_script", "Creates a deployment script for your application", -> | |
appName = "appName" | |
serverEnvironment = "staging" | |
serverAddress = "myserver.com" | |
sshUsername = "app" | |
startCommand = "/etc/init.d/#{appName} start" |
sudo cp /private/etc/php.ini.default /private/etc/php.ini
sudo php /usr/lib/php/install-pear-nozlib.phar
pear config-set php_ini /private/etc/php.ini
pecl config-set php_ini /private/etc/php.ini
sudo pear upgrade-all
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
cd / | |
touch /var/lock/xbmc.disabled | |
killall -9 xbmc.bin (XBMC will Close) | |
umount /storage | |
parted /dev/mmcblk0 | |
unit s | |
p (make note of starting sector of partition 2) | |
rm 2 | |
mkpart primary 258048 -1 (258048 is the starting sector of partition 2 you noted down earlier, add a space and -1) | |
quit parted |
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
// cached images don't fire load sometimes, so we reset src. | |
// this is DOM Node | |
if (this.complete || this.complete === undefined){ | |
var src = this.src; | |
// webkit hack from http://groups.google.com/group/jquery-dev/browse_thread/thread/eee6ab7b2da50e1f | |
// data uri bypasses webkit log warning (thx doug jones) | |
this.src = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw=="; | |
this.src = src; | |
} |
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
<?xml version='1.0' encoding='UTF-8'?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd" > | |
<plist version='1.0'> | |
<dict> | |
<key>Label</key><string>org.php.php-fpm</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>/usr/local/sbin/php-fpm</string> | |
<string>--fpm-config</string> | |
<string>/usr/local/etc/php/5.4/php-fpm.conf</string> |
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
//in your application, rather than using window.location to get the current url | |
App.getLocation = function(){ | |
return window.location.protocol + '//' + window.location.host | |
+ '/' + Backbone.history.options.root + Backbone.history.getFragment() | |
} |
OlderNewer