This file contains hidden or 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
require 'hpricot' | |
require 'open-uri' | |
require 'date' | |
class Post | |
attr_accessor :author, :title, :date, :tags, :comments | |
def initialize url | |
doc = Hpricot(open(url)) | |
@author = doc.search("//author/name").fetch(1).inner_text |
This file contains hidden or 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
sub new { | |
my ($class) = @_; | |
my @owned_files = (); | |
#The 'shared' files are the files that a user can read but does not own | |
my @shared_files = (); | |
my $self = { | |
#$[0] is the class | |
_name => $_[1], |
This file contains hidden or 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 curses | |
from curses.ascii import isdigit | |
import nltk | |
from nltk.corpus import cmudict | |
d = cmudict.dict() | |
def nsyl(word): | |
return [len(list(y for y in x if isdigit(y[-1]))) for x in d[word.lower()]] |
This file contains hidden or 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
escape \000\040 | |
bind n focus down | |
bind ^n focus down | |
bind p focus up | |
bind ^p focus up | |
bind k next | |
bind ^k next | |
bind j prev | |
bind ^j prev |
This file contains hidden or 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
[color] | |
diff = auto | |
status = auto | |
branch = auto | |
interactive = auto | |
ui = true | |
pager = true | |
[color "branch"] | |
current = yellow reverse |
This file contains hidden or 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
//HJava (HomoiconicJava): Imagining a (more) homoiconic Java | |
//In Java, the unit is the *class* | |
//So in HJava we will pretend that everything is a class (or, at least, an instance of a class). | |
//Obviously this won't compile in Java, because Java doesn't actually support homoiconic structures. | |
//But HJava does! | |
public class HomoiconicJava { |
This file contains hidden or 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
#Please tell me there is a better way to do this | |
#(And by 'a better way', I don't mean incorporating the cut within the awk script) | |
npm ls | grep -E "^(├|└)─" | cut -d" " -f2 | awk '{FS = "@"; print "\""$1"\"", ":", "\""$2"\""}' |
This file contains hidden or 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
bash-4.2$ jitsu deploy | |
info: Welcome to Nodejitsu chimeracoder | |
info: It worked if it ends with Nodejitsu ok | |
info: Executing command deploy | |
info: Analyzing your application dependencies in app.js | |
warn: Local version appears to be old | |
warn: Your package.json version will be incremented for you automatically | |
warn: About to write /Users/aditya/programming/nodejs/wasp/package.json | |
data: | |
data: { |
This file contains hidden or 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
magnet:?xt=urn:btih:30cf16d23446f98217c67b3b8840fbdb21ba1c9e&dn=WWWDaemon-0.1%5F-0.2%5F-0.3&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80 |
This file contains hidden or 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
;;Basic format; will create definition normally and ignore docstring entirely | |
(define-syntax autodoc (syntax-rules (define) [(_ docstr (define (name arg ...) body ...)) (define (name arg ...) body ...)]) | |
;;Simple expanded example; will create definition and also print docstring each time function is called | |
(define-syntax autodoc2 (syntax-rules (define) [(_ docstr (define (name arg ...) body ...)) (define (name arg ...) (begin (print docstr) body ...))])) | |
;; Function definition | |
(autodoc "Function that increments numbers" | |
(define (my-incr x) |
OlderNewer