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
int main (int argc, const char * argv[]) { | |
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; | |
int number = 3; | |
NSString * reason = [[NSString alloc] autorelease]; | |
switch (number) | |
{ | |
case 2: | |
NSLog(@"Number => 2"); |
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
# OMFG! I want to f*ck Github's brains out!! | |
Listen 443 | |
AddType application/x-x509-ca-cert .crt | |
AddType application/x-pkcs7-crl .crl | |
SSLPassPhraseDialog builtin | |
SSLSessionCache "shmcb:/private/var/run/ssl_scache(512000)" |
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
function rmate { | |
if [[ $# -eq 1 ]]; then | |
mate "${1}/app" "${1}/config" "${1}/lib" "${1}/public" "${1}/spec" "${1}/stories" | |
else | |
mate "app" "config" "lib" "public" "spec" "stories" | |
fi | |
} |
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
#!/usr/bin/env ruby -wKU | |
require "rubygems" | |
require "hpricot" | |
class Crawler | |
def initialize(site_uri='theonlyjames.com', | |
wget_path='/usr/local/bin/wget') | |
@site_uri = site_uri | |
@wget_path = wget_path | |
sanity_check |
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
VERSION='1.6.0.6' | |
wget http://www.kernel.org/pub/software/scm/git/git-$VERSION.tar.gz | |
tar xzvf git-$VERSION.tar.gz | |
cd git-$VERSION | |
make configure | |
./configure --prefix=/usr/local | |
NO_MSGFMT=yes make prefix=/usr/local all | |
sudo make install |
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
cat /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/version.plist | awk '/CFBundleVersion/{getline;gsub(/[<string>|<\/string>]/,\"\");gsub(/^[ \t]+|[ \t]+$/,\"\");print}' |
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
sudo ipfw add 100 deny udp from any to any 2222 |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>com.mysql.mysld_safe</string> | |
<key>OnDemand</key> | |
<false/> | |
<key>ProgramArguments</key> | |
<array> |
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
#!/usr/bin/env ruby -wKU | |
users = %x(dscl . -list /Users).split("\n") | |
uids = [] | |
users.each do |user| | |
uids += [%x(dscl . -read /Users/#{user} uid).split[-1].to_i] | |
end | |
puts uids.sort |
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
dscl . -create /Users/_pgsql | |
dscl . -append /Users/_pgsql RecordName pgsql | |
dscl . -create /Users/_pgsql UniqueID 80 | |
dscl . -create /Users/_pgsql RealName 'PostgreSQL Server' | |
dscl . -create /Users/_pgsql UserShell /usr/bin/false | |
dscl . -create /Groups/_pgsql | |
dscl . -create /Groups/_pgsql PrimaryGroupID 80 | |
dscl . -append /Groups/_pgsql RecordName pgsql | |
dscl . -create /Groups/_pgsql RealName 'PostgreSQL Users' |
OlderNewer