- JavaScript Jabber http://devchat.tv/js-jabber
- NodeUp http://nodeup.com
- Adventures in Angular http://devchat.tv/adventures-in-angular
- Ember Land http://ember.land
- React Podcast http://reactpodcast.com
- Frontside (often about Ember) https://frontsidethepodcast.simplecast.fm/
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
| var parser = document.createElement('a'); | |
| parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
| parser.protocol; // => "http:" | |
| parser.hostname; // => "example.com" | |
| parser.port; // => "3000" | |
| parser.pathname; // => "/pathname/" | |
| parser.search; // => "?search=test" | |
| parser.hash; // => "#hash" | |
| parser.host; // => "example.com:3000" |
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
| #!/bin/bash | |
| # n8.io daemon | |
| # chkconfig: 345 20 80 (NR: what is this???) | |
| # description: Nate's blog | |
| # processname: n8.io | |
| # original template from: http://werxltd.com/wp/2012/01/05/simple-init-d-script-template/ | |
| # working dir | |
| DAEMON_PATH="/home/pi/n8.io" |
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
| // Public domain. (You're welcome.) | |
| /// BOX(expr) | |
| /// | |
| /// Macro. Box simple things like `CGPoint` or `CGRect` into an `NSValue`. | |
| /// | |
| /// (Compare with the use of `@` in `@YES`, @123, @"abc" or `@(1 + 2)`.) | |
| #define BOX(expr) ({ __typeof__(expr) _box_expr = (expr); \ | |
| [NSValue valueWithBytes:&_box_expr objCType:@encode(__typeof__(expr))]; }) |
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
| // Widget.h | |
| #import <UIKit/UIKit.h> | |
| @interface Widget : UIView | |
| @property (nonatomic, copy) void (^action)(Widget *widget, NSUInteger someArg); | |
| @end | |
| // Widget.m | |
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
| var fs = require('fs'); | |
| var net = require('net'); | |
| var http = require('http'); | |
| var https = require('https'); | |
| var httpAddress = '/path/to/http.sock'; | |
| var httpsAddress = '/path/to/https.sock'; | |
| fs.unlinkSync(httpAddress); | |
| fs.unlinkSync(httpsAddress); |
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
| // UPD: | |
| // Now available as npm module! | |
| // Check out https://github.com/RReverser/better-log for details. | |
| console.log = (function (log, inspect) { | |
| return function () { | |
| return log.apply(this, Array.prototype.map.call(arguments, function (arg) { | |
| return inspect(arg, { depth: 1, colors: true }); | |
| })); | |
| }; |
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
| var touchstartX = 0; | |
| var touchstartY = 0; | |
| var touchendX = 0; | |
| var touchendY = 0; | |
| var gesuredZone = document.getElementById('gesuredZone'); | |
| gesuredZone.addEventListener('touchstart', function(event) { | |
| touchstartX = event.screenX; | |
| touchstartY = event.screenY; |
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
| const I = x => x | |
| const K = x => y => x | |
| const A = f => x => f (x) | |
| const T = x => f => f (x) | |
| const W = f => x => f (x) (x) | |
| const C = f => y => x => f (x) (y) | |
| const B = f => g => x => f (g (x)) | |
| const S = f => g => x => f (x) (g (x)) | |
| const S_ = f => g => x => f (g (x)) (x) | |
| const S2 = f => g => h => x => f (g (x)) (h (x)) |
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
| license: mit |