PT1ncmJlZXVobXVtNFMrbUlXK2F6RkdkekZXVFFpbzVNNmE1 PWdKcWwzNHJtakl1a0g0cG96NWltekl2dmZJdWtYVE1ucUw1RVdMNjZxTDVxaUw1 TytaNS9XWjY3Nlk1NGk0NTRpNDVtaWI1TXk3N2FtYTVRaW81MENaNVBDYjVPaUw1TXk3NzQrWTVzV1k1RXE1NXhlYjVxZUk2SnlwNUZDSTZXaW81SWliNUU2cDUyNnA1NmlMNVFpbzU=
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
window.requestAnimFrame = (function() { | |
return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function(a) { | |
window.setTimeout(a, 1000 / 60) | |
} | |
})(); | |
window.onload = function() { | |
var m = canvas.getContext("2d"), | |
k, g; | |
canvas.width = k = window.innerWidth * 2.1; | |
canvas.height = g = window.innerHeight * 1.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
var STRIP_COMMENT_TAG_REGEXP, end, start, stripCommentTag, testStringA, testStringB; | |
STRIP_COMMENT_TAG_REGEXP = /<!--(.|\s)*?-->/gm; | |
stripCommentTag = function(html) { | |
return html.replace(STRIP_COMMENT_TAG_REGEXP, ""); | |
}; | |
testStringA = '<!-- -->'; |
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
<?xml version="1.0" encoding="UTF-8" ?> | |
<opml version="1.0"> | |
<head> | |
<title>寸志 subscriptions in Digg Reader</title> | |
</head> | |
<body> | |
<outline text="Framer Blog" title="Framer Blog" type="rss" xmlUrl="http://framerjs.tumblr.com/rss" htmlUrl="http://framerjs.tumblr.com/" /> | |
<outline text="粉丝日志" title="粉丝日志" type="rss" xmlUrl="http://blog.fens.me/feed/" htmlUrl="http://blog.fens.me" /> | |
<outline text="AngularJS" title="AngularJS" type="rss" xmlUrl="http://blog.angularjs.org/feeds/posts/default" htmlUrl="http://blog.angularjs.org/" /> | |
<outline text="blog.izs.me" title="blog.izs.me" type="rss" xmlUrl="http://blog.izs.me/rss" htmlUrl="http://blog.izs.me/" /> |
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
{ | |
request: { | |
method: 'POST', | |
url: '/api/forums', | |
header: { | |
host: 'localhost:3000', | |
connection: 'keep-alive', | |
'content-length': '77', | |
'cache-control': 'no-cache', | |
origin: 'chrome-extension://fhbjgbiflinjbdggehcddcbncdddomop', |
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
/** | |
http://james.padolsey.com/javascript/parsing-urls-with-the-dom/ | |
*/ | |
function parseURL(url) { | |
var a = document.createElement('a'); | |
a.href = url; | |
return { | |
source: url, | |
protocol: a.protocol.replace(':',''), | |
host: a.hostname, |
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
require 'mail' | |
require 'gmail' | |
require 'base64' | |
gmail = Gmail.connect('[email protected]', 'password') | |
emailComeFromSomeone = gmail.inbox.find(:before => Date.parse("2012-10-01"), :after => Date.parse("2012-09-01"), :from => '[email protected]') | |
emailComeFromSomeone.each do |mail| | |
begin |
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
" vundle | |
" git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle | |
set nocompatible " be iMproved | |
filetype off " required! | |
set rtp+=~/.vim/bundle/vundle/ | |
call vundle#rc() | |
" let Vundle manage Vundle | |
" required! |
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
// File: global.js | |
var timestamp = new Date() | |
exports.global = { | |
timestamp: timestamp | |
} | |
console.log('timestemp from global.js is ' + timestamp) | |
// File: foo.js | |
var _global = require('./global').global |
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
var body, listener; | |
listener = { | |
handleEvent: function (evt) { | |
return console.log(evt.type); | |
} | |
}; | |
body = document.body; | |
body.addEventListener("click", listener); | |
body.addEventListener("keyup", listener); |
NewerOlder