Skip to content

Instantly share code, notes, and snippets.

View guanix's full-sized avatar

Guan Yang guanix

  • 44FE 23DB 362F 611C 0CC3 116B D49B 113D 48DC 370E
  • New York
View GitHub Profile
. 86400 IN SOA a.root-servers.net. nstld.verisign-grs.com. 2014020301 1800 900 604800 86400
. 86400 IN RRSIG SOA 8 0 86400 20140210000000 20140202230000 33655 . i2JbM98T1U5nBG+GX6CmXMH0ZbBLmgKgbbropo7A7J5YR/uwJGQn5kssP0BoNYNxuGXyd7PtwNPQ8GmvDE6yg4nksZtfUfnue0AbIDi6DHKqdC+c6J0w3vA37VsK2RDigxs/nolLK6ZKNQ6LErLBXyi0AychoxVp7maPQ6P89JM=
. 518400 IN NS a.root-servers.net.
. 518400 IN NS b.root-servers.net.
. 518400 IN NS c.root-servers.net.
. 518400 IN NS d.root-servers.net.
. 518400 IN NS e.root-servers.net.
. 518400 IN NS f.root-servers.net.
. 518400 IN NS g.root-servers.net.
. 518400 IN NS h.root-servers.net.

Keybase proof

I hereby claim:

  • I am guanix on github.
  • I am guan (https://keybase.io/guan) on keybase.
  • I have a public key whose fingerprint is 44FE 23DB 362F 611C 0CC3 116B D49B 113D 48DC 370E

To claim this, I am signing this object:

Bomber is a node.js web framework inspired by Rails, Django and anything else out there that has caught our eye.
Main website and documentation: http://bomber.obtdev.com/
Warning! Right now the API is very much in a state of flux. We are still experimenting with the best way to make Bomber both intuitive and powerful. Expect things to change a lot for the forseeable future.
Getting up and running
----------------------
The source code for Bomber is [located on GitHub][bomber-src]. To check it out, run the following command:
open("path.tmp")
.then(function (stream) {
return stream.write("some text");
}).then(function (stream) {
return stream.close();
}).then(function () {
return rename("path.tmp", "path");
}, function (e) {
// one error handler for an error at any point in the chain
});
// fileIO style continuables example
// Note: All the three examples here are done based on the *same* API,
// namely the fileIO continuables API
// "Promise lite" style with either:
readFile("11.txt")(either(
function (e) {
// handle an error
},
function (obj) {
require.paths.unshift('/Users/guan/code/node-promise');
var promise = require('node-promise'),
sys = require('sys');
process.mixin(GLOBAL, require('promise'));
// A promise version of setTimeout
var delay = function (timeout) {
var deferred = new process.Promise();
setTimeout(function () {
deferred.resolve();
var continuables = require('continuables'), sys = require('sys');
function delay(timeout, fail) {
var continuable = continuables.create();
setTimeout(function () {
if (fail)
continuable.fulfill(new Error('fail'));
else
continuable.fulfill(true);
}, timeout);

Watch my video explanation!

in_reply_to_id

in_reply_to_id is a piece of information that may be associated with a tweet. It is a reference to the tweet that is being replied to. On twitter.com, you can tell that in_reply_to_id is set because the “in reply to” link is visible. In other Twitter clients, there may be a similar link or an icon to show a discussion thread.

If in_reply_to_id is not set, then it can be difficult or impossible to tell which tweet is being replied to, and it can be difficult to reconstruct discussion threads.

Reply visibility

Read Ken Rockwell on Modern Exposure.

The steps for taking a good photograph with a digital camera are:

  1. Take a photo.
  2. Look at the screen.
  3. Change settings.
  4. Go to back step 1.

The settings you'll want to change on an S90 are:

--- ../yahoo/youtube-dl 2011-02-10 22:10:41.000000000 +0000
+++ youtube-dl 2011-02-21 01:43:43.000000000 +0000
@@ -1714,13 +1714,11 @@
'url': video_url.decode('utf-8'),
'uploader': video_uploader.decode('utf-8'),
'upload_date': u'NA',
- 'title': video_title.decode('utf-8'),
- 'stitle': simple_title.decode('utf-8'),
+ 'title': video_title,
+ 'stitle': simple_title,