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
Process: Safari [22389] | |
Path: /Applications/Safari.app/Contents/MacOS/Safari | |
Identifier: com.apple.Safari | |
Version: 5.0.4 (6533.20.27) | |
Build Info: WebBrowser-75332027~1 | |
Code Type: X86-64 (Native) | |
Parent Process: launchd [204] | |
Date/Time: 2011-03-15 21:22:18.479 +0800 | |
OS Version: Mac OS X 10.6.6 (10J567) |
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
var document = app.activeDocument; | |
if(document && folder) | |
{ | |
var options = new ExportOptionsPNG24(); | |
options.antiAliasing = true; | |
options.transparency = true; | |
var n = document.layers.length; | |
for(var i=0; i<n; ++i) | |
{ |
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
import urlparse | |
from selenium import webdriver | |
from django.test import TestCase | |
from django.conf import settings | |
from django.core.urlresolvers import reverse | |
class BackendsTest(TestCase): | |
def setUp(self): |
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/sh | |
##################### | |
# Arch Linux | |
##################### | |
[ "$UID" != 0 ] && su=sudo | |
country='Singapore' | |
url="http://www.archlinux.org/mirrorlist/?country=$country&protocol=ftp&protocol=http&ip_version=4&use_mirror_status=on" |
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
Press ENTER or type command to continue | |
#!/bin/sh | |
##################### | |
# Mac OS X | |
##################### | |
# Mac personal apps | |
# TODO: use wget to automate these :-) | |
# manually download and install skype |
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
function mycoolajaxCall(csrfmiddlewaretoken, whateverla) { | |
post_data = {csrfmiddlewaretoken: csrfmiddlewaretoken, | |
whateverla: whateverla} | |
$.ajax({ | |
url: the_url, | |
data: post_data, | |
type: 'POST', | |
dataType: 'json', | |
success: function (data) { | |
alert("Success! You are so cool, my friend.") |
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
class PaypalFactory(factory.Factory): | |
FACTORY_FOR = Paypal | |
class BankdraftFactory(factory.Factory): | |
FACTORY_FOR = Bankdraft | |
class BanktransferFactory(factory.Factory): | |
FACTORY_FOR = Banktransfer |
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
if [ -e /etc/sudoers.tmp -o "$(pidof visudo)" ]; then | |
echo $(pidof visudo) | |
echo "/etc/sudoers busy, try again later" | |
exit 1 | |
fi | |
cp -p /etc/sudoers /etc/sudoers.bak | |
cp -p /etc/sudoers /etc/sudoers.tmp | |
line="%wheel ALL=(ALL) 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
import urlparse | |
from selenium import webdriver | |
from django.test import TestCase | |
from django.conf import settings | |
from django.core.urlresolvers import reverse | |
class BackendsTest(TestCase): | |
def setUp(self): |
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
calvin$ python setup.py register | |
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'install_requires' | |
warnings.warn(msg) | |
running register | |
running check |