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
"============================================================================= | |
" File: gist.vim | |
" Author: Yasuhiro Matsumoto <mattn.jp@gmail.com> | |
" Last Change: 03-Jul-2009. | |
" Version: 2.7 | |
" WebPage: http://github.com/mattn/gist-vim/tree/master | |
" Usage: | |
" | |
" :Gist | |
" post whole text to gist. |
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
#!/usr/bin/env python | |
from sys import argv | |
def hopp(number): | |
if (number % 3) == 0 and (number % 5) == 0: | |
print 'Hop' | |
elif number % 3 == 0: | |
print 'Hoppity' | |
elif number % 5 == 0: |
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
#!/usr/bin/env python | |
from sys import argv | |
if __name__ == '__main__': | |
text = open(argv[1]).read() | |
print 'Meep meep!' |
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
#include <iostream> | |
using namespace std; | |
int main() | |
{ | |
cout<<"Python rulz!"<<endl; | |
return 0; | |
} |
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
elem' :: (Eq a) => a -> [a] -> Bool | |
elem' x xs = if head xs == x | |
then | |
True | |
else | |
if length xs == 1 | |
then | |
False | |
else | |
elem' x (tail xs) |
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 Foo(object): | |
... schema = {} | |
... | |
>>> f = Foo() | |
>>> f.schema['roder'] = 'hello' | |
>>> f.schema['roder'] | |
'hello' | |
>>> f = Foo() | |
>>> f.schema.has_key('roder') | |
True |
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 Foo(object): | |
... s = "string" | |
... | |
>>> f = Foo() | |
>>> f.s | |
'string' | |
>>> f.s = "another string" | |
>>> f.s | |
'another string' | |
>>> f = Foo() |
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
$ cat .htaccess | |
<IfModule mod_rewrite.c> | |
RewriteEngine on | |
Redirect permanent / http://www.esclavosdelsistema.net | |
</IfModule> |
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
$ cat .htaccess | |
<IfModule mod_rewrite.c> | |
RewriteEngine on | |
Redirect permanent / http://www.apparatusproject.org | |
</IfModule> |