Skip to content

Instantly share code, notes, and snippets.

"=============================================================================
" 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.
#!/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:
#!/usr/bin/env python
from sys import argv
if __name__ == '__main__':
text = open(argv[1]).read()
print 'Meep meep!'
#include <iostream>
using namespace std;
int main()
{
cout<<"Python rulz!"<<endl;
return 0;
}
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)
>>> class Foo(object):
... schema = {}
...
>>> f = Foo()
>>> f.schema['roder'] = 'hello'
>>> f.schema['roder']
'hello'
>>> f = Foo()
>>> f.schema.has_key('roder')
True
>>> class Foo(object):
... s = "string"
...
>>> f = Foo()
>>> f.s
'string'
>>> f.s = "another string"
>>> f.s
'another string'
>>> f = Foo()
$ cat .htaccess
<IfModule mod_rewrite.c>
RewriteEngine on
Redirect permanent / http://www.esclavosdelsistema.net
</IfModule>
$ cat .htaccess
<IfModule mod_rewrite.c>
RewriteEngine on
Redirect permanent / http://www.apparatusproject.org
</IfModule>
@igorgue
igorgue / gentags.sh
Created August 18, 2009 04:22
Generate ctags and cscope dbs
#!/bin/bash
files=`find -iname '*.py'`
echo 'building ctags'
ctags $files
echo $files > cscope.files
echo 'building cscope db'
cscope -b
echo 'done'