This file contains hidden or 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
property NetworkName : "adhoc_network" | |
property NetworkPassword : "password" | |
property CreateMenuName : "Create Network…" | |
try | |
do shell script "/usr/sbin/scselect " & NetworkName | |
delay 2 | |
end try | |
tell application "System Events" |
This file contains hidden or 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 | |
# setup ------------------------------------------------------------------------ | |
tempDir="/tmp/`whoami`/chrome-nightly/"; | |
baseURL="http://commondatastorage.googleapis.com/chromium-browser-snapshots/Mac"; | |
baseName="chrome-mac"; | |
baseExt="zip"; | |
appName="Chromium.app"; | |
appDir="/Applications"; | |
version=~/.CURRENT_CHROME; |
This file contains hidden or 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
// For http://www.fas.org/man/dod-101/sys/land/bullets.htm | |
var sound = '<EMBED SRC="biggun.wav" HIDDEN="True"><BGSOUND SRC="biggun.wav">'; | |
for (var i=0; i <= 100; i++) { document.body.insertAdjacentHTML('beforeEnd', sound); } |
This file contains hidden or 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 | |
COLORS=( red green blue cyan magenta yellow orange pink purple ) | |
TMP_DIR=/tmp/colorme/`date +%s` | |
OUTPUT="$HOME/Desktop/animated.gif" | |
DELAY=5 | |
# Create us a temp directory | |
mkdir -p $TMP_DIR | |
# Create a base grayscale image to colorize |
This file contains hidden or 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
# Want to show hidden files and folders in your TextMate project drawer? Simple, just modify the file and folder patterns in TextMate's preferences. | |
# Instructions: | |
# Go to TextMate > Preferences... | |
# Click Advanced | |
# Select Folder References | |
# Replace the following: | |
# File Pattern |
This file contains hidden or 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
/** | |
Sample Propane caveatPatchor.js file based on tmm1's avatar hack. | |
You'll need at least version 1.1.1 to experiment with this: | |
http://propaneapp.com/appcast/Propane.1.1.1.zip | |
Once I'm sure exposing this hack-injection point doesn't cause problems | |
I'll do an official auto-updating version. | |
As of version 1.1.1, Propane will load and execute the contents of |
This file contains hidden or 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
server { | |
error_log /usr/local/var/log/nginx/error.log; | |
listen widgets.local:80; | |
server_name widgets.local; | |
client_max_body_size 4G; | |
keepalive_timeout 70; | |
root /Users/username/rails/widgets/public; | |
error_page 502 /502.html; |
This file contains hidden or 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
# inspired by http://ariejan.net/2010/08/23/resque-how-to-requeue-failed-jobs | |
# retry all failed Resque jobs except the ones that have already been retried | |
# This is, for instance, useful if you have already retried some jobs via the web interface. | |
Resque::Failure.count.times do |i| | |
Resque::Failure.requeue(i) unless Resque::Failure.all(i, 1)['retried_at'].present? | |
end | |
# retry all :) | |
Resque::Failure.count.times do |i| |
This file contains hidden or 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
upstream unicorn { | |
server unix:/var/www/example/current/tmp/sockets/unicorn.sock; | |
} | |
server { | |
listen 80; | |
server_name example.org www.example.org; | |
access_log /var/log/nginx/example.access.log; | |
location / { | |
root /var/www/example/current/public/; | |
if (-f $request_filename) { |
This file contains hidden or 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
task :restart, :roles => :app, :except => { :no_release => true } do | |
socket_path = "#{shared_path}/sockets/unicorn.sock" | |
restart_command = "if [ -e #{socket_path} ]; then /etc/init.d/beenverified_com upgrade; else touch #{current_path}/tmp/restart.txt; fi" | |
run restart_command | |
end |