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 ruby | |
# watch.rb by Brett Terpstra, 2011 <http://brettterpstra.com> | |
# with credit to Carlo Zottmann <https://github.com/carlo/haml-sass-file-watcher> | |
# modified for Chrome by vil, 2015-05-16 | |
trap("SIGINT") { exit } | |
if ARGV.length < 2 | |
puts "Usage: #{$0} watch_folder keyword" | |
puts "Example: #{$0} . mywebproject" |
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 <Cocoa/Cocoa.h> | |
#define k_NSArrayTupleAssignment @"THISISAMAGICVALUELOL" | |
#define _(...) [NSArray arrayOfPointerValues:(void *)__VA_ARGS__, NULL][k_NSArrayTupleAssignment] | |
@interface NSArray (TupleAssignment) | |
+ (instancetype)arrayOfPointerValues:(void *)pointer1, ...; |
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
// NSCoder+KeyedSubscripting.h: | |
@interface NSCoder (KeyedSubscripting) | |
- (id)objectForKeyedSubscript:(id <NSCopying>)key; | |
- (void)setObject:(id)object forKeyedSubscript:(id <NSCopying>)key; | |
@end | |
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
NSVisualEffectMaterial constants, and the undocumented materials they coorespond to in various modes: | |
+----------------------+-------+----------+------+---------+ | |
| MATERIAL # | LIGHT | LIGHT EM | DARK | DARK EM | | |
+----------------------+-------+----------+------+---------+ | |
| | | | | | | |
| 0 - Appearance Based | 3 | 3 | 5 | 5 | | |
| | | | | | | |
| 1 - Light | 3 | 3 | 3 | 3 | | |
| | | | | | | |
| 2 - Dark | 4 | 4 | 4 | 4 | |
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
// | |
// NSObject+TryMethod.h | |
// SUPER HAX | |
// | |
// Created by Bill Doyle on 2014-05-06. | |
// | |
#import <Foundation/Foundation.h> | |
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 Eva < Zebra | |
include MongoMapper::Document | |
include Vegan::Powers | |
include MongoMapperExt::Taggable | |
include MongoMapper::Tweetable | |
## Keys | |
key :scarves_count, Integer, :default => 20 | |
key :compliments_count, Integer, :default => 100 | |
key :hivemind_response_count, Integer, :default => 500 |
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
(function() | |
{ | |
var q = String.fromCharCode(34); | |
var quine = [ | |
"(function()", | |
"{", | |
" var q = String.fromCharCode(34);", | |
" var quine = [", | |
" ", | |
" ];", |
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
this.quine = function () | |
{ | |
console.log("this.quine = " + this.quine.toString() + ";\nquine();"); | |
}; | |
quine(); |
NewerOlder