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 | |
rm /Users/$USER/Downloads/*.pdf |
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
gem install rjb -v 1.3.3 --platform ruby | |
gem install buildr |
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
<project name="scalaIsAwesome" basedir="." default="build"> | |
<property name="scala-compiler.jar" | |
value="/usr/local/Cellar/scala/2.8.1/libexec/lib/scala-compiler.jar"/> | |
<property name="scala-library.jar" | |
value="/usr/local/Cellar/scala/2.8.1/libexec/lib/scala-library.jar"/> | |
<path id="scala.classpath"> | |
<pathelement location="${scala-compiler.jar}"/> | |
<pathelement location="${scala-library.jar}"/> | |
</path> | |
<taskdef resource="scala/tools/ant/antlib.xml"> |
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
class Semaphore: | |
def init(self, n): | |
self.lock = BinSemaphore(1) | |
self.delay = BinSemaphore(0) | |
self.var = n | |
def wait(self): | |
self.lock.wait() | |
self.var = self.var - 1 | |
if self.var < 0: |
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
import sys | |
def isapoweroftwo(n): | |
if n == 0: | |
return False | |
if n & (n - 1) == 0: | |
return True |
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
import hashlib, urllib2, sys, os | |
class Gravatar: | |
def __init__(self, email): | |
self.email = email | |
self.hash = hashlib.md5(self.email.lower()).hexdigest() | |
def get(self): | |
try: |
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
<ul class="faint" id="links"> | |
<li><a href="http://www.twitter.com" class="rounded">Twitter</a></li> | |
<li><a href="http://www.flickr.com"class="rounded">Flickr</a></li> | |
</ul> |
NewerOlder