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
import sys | |
import re | |
import string | |
import urllib | |
filename = "".join(sys.argv[1:]) | |
if filename.startswith("http"): | |
htmlFile = urllib.urlopen(filename) | |
else: | |
htmlFile = open(filename, 'r') |
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
" Vim color file | |
" Maintainer: Daniel Bolton <danielbarrettbolton@gmail.com> | |
" Last Modified: 2010-07-04 | |
" Version: 0.1 | |
" | |
" This scheme is based on the excellent lucius scheme. The cfterm colors are | |
" in fact exactly the same, and exist simply because I was too lazy to remove | |
" them yet. | |
set background=dark |
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 has('gui_running') | |
set guioptions-=T " no toolbar | |
colorscheme obsidian2 | |
endif | |
set ic "Ignore case when searching | |
set number | |
set nocompatible "No to VI compatible mode | |
set backup "Make backup files | |
set mouse=a |
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
public class Foo { | |
boolean a; | |
int b; | |
public Foo() { | |
a = true; | |
b = 42; | |
} | |
} |
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
var loglevel = 3; | |
function debug(message, level) { | |
level = level || 1; | |
if ( console ) { | |
if ( level >= loglevel ) { | |
console.log(message); | |
} | |
} | |
} |
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
set nocompatible | |
source $VIMRUNTIME/vimrc_example.vim | |
source $VIMRUNTIME/mswin.vim | |
"behave mswin | |
if has('gui_running') | |
set guioptions-=T " no toolbar | |
colorscheme obsidian2 | |
endif |
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
boolean isFoo() { | |
int status = this.getStatus(); | |
return (status != STATUS_BAR && | |
status != STATUS_BAZ); | |
} | |
vs. | |
boolean isFoo() { |
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
;Get all methods/properties of some object | |
(goog.object/getKeys some-object) | |
;Getting undefined errors? Use undefined? to probe | |
(undefined? load-namespace) | |
(undefined? str) |
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
(defn make-param-str [param-map] | |
(join "&" (map (fn [[key val]] (format "%s=%s" (name key) val)) param-map))) | |
;TODO still needs URL encoding -- format wont work in clojurescript |
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 <stdio.h> | |
#include <assert.h> | |
#include <stdlib.h> | |
typedef struct Node { | |
int data; | |
struct Node *next; | |
struct Node *prev; | |
} Node; |
OlderNewer