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
\usepackage[xetex]{graphicx} | |
\usepackage{fontspec,xunicode} | |
\defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase} | |
\setmainfont[Scale=.95]{Times} | |
\setmonofont{Lucida Sans Typewriter} |
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
function assert(condition, message) { | |
if (!condition) { | |
message = message || "Assertion failed"; | |
if (typeof Error !== "undefined") { | |
throw new Error(message); | |
} | |
throw message; // Fallback | |
} | |
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
log = console.log.bind(console); | |
maybe = v => { | |
function * f () { | |
if (v) yield v; | |
} | |
f.bind = f => | |
v ? f(v) : maybe(); |
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
// `unit` is `return` from Haskell | |
// `bind` is `>>=` from Haskell, or `flatMap` from Scala | |
var None = { | |
bind: function (fn) { return this; }, | |
unit: function (v) { return Option(v); }, | |
getOrElse: function (elseValue) { return elseValue; } | |
}; | |
var Some = function (value) { |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
#pragma mark UITableViewDataSource | |
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { | |
return [self.statuses count]; | |
} | |
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { | |
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"STTwitterTVCellIdentifier"]; | |
if(cell == nil) { |
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
#!/usr/bin/env ruby | |
if ARGV[0].nil? || ARGV[0].match(/-h/) | |
puts "Usage : #{$0} github_username dash_sqlite_db char_appended_to_keyword [no_comments]" | |
exit | |
end | |
require 'net/http' | |
require 'open-uri' | |
#require 'awesome_print' |
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 <UIKit/UIKit.h> | |
@interface ViewController : UIViewController <UITableViewDelegate, UITableViewDataSource> | |
@property (weak, nonatomic) IBOutlet UITableView *tableView; | |
@property (strong, nonatomic) NSMutableArray *data; | |
@end |
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
/* Lorem Ipsum Generator | |
* (CC-BY) Fredrik Bridell <[email protected]> 2009 | |
* Version 0.21 - multilingual | |
* Released under a Creative Commons Attribution License | |
* | |
* You are welcome to use, share, modify, print, frame, or do whatever you like with this | |
* software, including commercial use. My only request is that you tell the world where you found it. | |
* | |
* One way is to include the phrase: | |
* "Using the The Lorem Ipsum Generator by Fredrik Bridell (http://bridell.com/loremipsum/)" |