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
Building TinyScheme | |
------------------- | |
The included makefile includes logic for Linux, Solaris and Win32, and can | |
readily serve as an example for other OSes, especially Unixes. There are | |
a lot of compile-time flags in TinyScheme (preprocessor defines) that can trim | |
unwanted features. See next section. 'make all' and 'make clean' function as | |
expected. | |
Autoconfing TinyScheme was once proposed, but the distribution would not be |
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 | |
# tinyurl creator - places tinyurl on Mac OS X clipboard | |
# Usage: ./tinyurl http://www.google.com | |
# Credits: Based on this script: http://wtanaka.com/node/7750 | |
URL=$(wget -q -O - -U "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.8) Gecko/20071008 Firefox/2.0.0.8" --header="Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,video/x-mng,image/png,image/jpeg,image/gif;q=0.2,*/*;q=0.1" --header="Accept-Language: en" --header="Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7" --referer="http://tinyurl.com/" --header="Content-Type: application/x-www-form-urlencoded" --post-data="url=$*" http://tinyurl.com/create.php | sed -n 's/.*\(http:\/\/tinyurl.com\/[a-z0-9][a-z0-9]*\).*/\1/p' | uniq) | |
echo $URL | tr -d "\n" | pbcopy | |
echo $URL |
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 Felicitations(object): | |
def __init__(self): | |
self.felicitations = [ ] | |
def addon(self, word): | |
self.felicitations.append(word) | |
def printme(self): | |
greeting = string.join(self.felicitations[0:], "") | |
print greeting |
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
# Copied/Pasted from http://www.oreillynet.com/ruby/blog/2005/12/hello_world.html | |
# The Greeter class | |
class Greeter | |
def initialize(name) | |
@name = name.capitalize | |
end | |
def salute | |
puts "Hello #{@name}!" | |
end |
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 you are seeing this Gist instead of the one you expected it is because you omitted the id attribute in the Wordpress GitHub Gist Shortcode tag. | |
Correct usage is, for example: | |
[gist id="30948"] |
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
Test gist for wordpress gist shotcode plugin |