Skip to content

Instantly share code, notes, and snippets.

View newzealandpaul's full-sized avatar

Paul newzealandpaul

View GitHub Profile
@newzealandpaul
newzealandpaul / BUILDING
Created April 11, 2012 08:48
tinyscheme-1.40/BUILDING
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
@newzealandpaul
newzealandpaul / gist:53879
Created January 28, 2009 09:14
tinyurl on mac clipboard
#!/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
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
# 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
@newzealandpaul
newzealandpaul / Default Gist
Created December 2, 2008 02:44
Default Gist for GitHub Gist Shortcode Plugin
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"]
Test gist for wordpress gist shotcode plugin