Input file:
$ cat foo
qwe
123
bar
The following document is a written account of the Code School screencasting framework. It should be used as a reference of the accompanying screencast on the topic.
You're probably aren't going to take the time to read this document if you're not interested, but there are a lot of nice side effects caused by learning how to create quality screencasts.
$(function () { | |
var article_root = $("article"); | |
var search_api = "https://www.googleapis.com/customsearch/v1element"; | |
var apikey = "AIzaSyCVAXiUzRYsML1Pv6RwSG1gunmMikTzQqY"; | |
var cseid = "004387629570218579707:w1sg4iph0mc"; | |
var query = location.hash.match(/^\#q=([^&]+)/)[1]; | |
document.title = "'" + query + "' の検索結果 - 開発な日々"; | |
var result_url = [search_api, "?key=", apikey, "&rsz=large&num=8&cx=", cseid, "&q=", encodeURI(query), "&callback=?"].join(""); | |
$("input[name='q']").val(query); | |
$.getJSON(result_url, function (data) { |
https://github.com/chrisa/node-dtrace-provider
https://github.com/cheongwy/node-scrypt
https://github.com/forward/node-hdfs
https://github.com/Sembiance/node-number-smusher
https://github.com/bolgovr/node-ip2location
https://github.com/xenophy/node-iconv
https://github.com/JulesAU/node-msgpack
#run as sudo | |
apt-get install python-setuptools curl | |
easy_install supervior | |
curl https://raw.github.com/gist/176149/88d0d68c4af22a7474ad1d011659ea2d27e35b8d/supervisord.sh > /etc/init.d/supervisord | |
#to run it | |
chmod +x /etc/init.d/supervisord | |
#adding to autostart |
# Here a few bash one-liners that helped me analyze / fight a weak DOS attack against debuggable.com. Mostly for future reference. | |
# The attacker was opening lots of tcp connections without sending data, I believe it's called a SYN flood, see: http://tools.ietf.org/html/rfc4987#section-3.2 | |
# Step 0: Check what is going on at port 80 | |
$ netstat -tan | grep ':80 ' | awk '{print $6}' | sort | uniq -c | |
# Step 1: Increase the number of available fds | |
$ ulimit -n 32000 | |
# Step 2: Restart your webserver, for me: |
require 'rubygems' | |
require 'kconv' | |
require 'csv' | |
require 'vpim' | |
$KCODE='u' | |
#Authors:: takuya_1st | |
#Copyright:: @takuya_1st | |
#License:: GPL | |
class CSV | |
## CSVファイルを読み込んで一行目を見出し行として、全部をハッシュに読み込む |
// module dependencies | |
var http = require('http'), | |
url = require('url'); | |
/** | |
* UrlReq - Wraps the http.request function making it nice for unit testing APIs. | |
* | |
* @param {string} reqUrl The required url in any form | |
* @param {object} options An options object (this is optional) |
Over the weekend I implemented a few Array methods in plain JavaScript to avoid recently patched Rhino bugs. That got my thinking about ES5 fallback implementations in various JavaScript libs/frameworks/transpilers. I decided to compile a not-so-complete list of ES5 related discrepancies found in many of them. Differences in native vs. fallback implementations create cross-browser inconsistencies and increase the chance of usage errors. I hope this post will raise awareness of just how hard it is to follow spec (during my research I found a few issues in my own projects too). All library developers should to take a closer look at their code and make the small changes needed to follow the specification (especially if your code forks for native methods).
Most implementations suffer from the following