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
/* node getImages.js http://www.yahoo.co.jp */ | |
var htmlparser = require('htmlparser'); | |
var sys = require('sys'); | |
var http = require('http'); | |
var fs = require('fs'); | |
var url = require('url'); | |
var path = require('path'); | |
if(process.argv.length !== 3){ |
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
/* | |
use dot separated string as nested object path | |
and parse it to get the value | |
*/ | |
// sample nested object: | |
var messages = | |
errors: { | |
username: { | |
validation: 'Username is invalid' | |
} |
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
// always defined locals | |
res.locals.user = req.user; | |
// cached locals | |
if (req.xhr) { return next(); } | |
console.log(req.url); | |
/* ************ * | |
* Non XHR only | |
* ************ */ |
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
(function () { | |
var MOVE_THRESHOLD = 20; | |
// 'tap'イベントをjQueryに登録 | |
$.event.special.tap = { | |
setup: function() { | |
var self = $(this); | |
self.on('touchstart', function(e) { | |
var moved = false, | |
origTarget = e.target, | |
origEvent = e.originalEvent, |
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
alias grepall='find . | xargs grep -s -n --color -E' |
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
sudo port install php55 +fastcgi fcgi apache-ant php55-cgi php55-mbstring php55-curl php55-mcrypt php55-imagick php55-xdebug php55-iconv php55-mongo php55-oauth php55-openssl php55-esmtp php55-pop3 php55-tidy php55-uploadprogress php55-pcntl php55-sockets php55-soap php55-ssh2 php55-big_int php55-gd php55-svm php55-html_parse php55-http php55-mysql php55-pdflib php55-pear php55-peb php55-posix php55-pspell php55-rar php55-redis php55-snmp php55-stomp php55-svn php55-wddx php55-xmlrpc php55-yaml php55-zip php55-dbase php55-excel php55-gdchart php55-imap php55-xsl php55-redis | |
sudo port install postgresql92 postgresql92-server postgresql92-doc postgresql_autodoc php55-postgresql phppgadmin postgresql-jdbc mysql5-server phpmyadmin maven3 maven-ant-tasks | |
sudo port install nginx +flv +geoip +gzip_static +mail +mp4 +ssl +status +substitution +upload +upload_progress +xslt +zip | |
You may need to update your php.ini for any changes that have been made in this version of php55. Compare /opt/local/etc/php55/php.ini wit |
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
{ | |
"keywords": [], | |
"devDependencies": { | |
"async": "^0.7.0", | |
"body-parser": "^1.0.2", | |
"canvas": "~1.1.3", | |
"cheerio": "^0.12.4", | |
"colors": "~0.6.2", | |
"compression": "^1.0.1", | |
"connect-flash": "^0.1.1", |
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 cluster = require('cluster'); | |
var cpuCount = require('os').cpus().length; | |
if (cluster.isMaster) { | |
for (var i = 0; i < cpuCount; i += 1) { | |
cluster.fork(); | |
} | |
} else {*/ | |
var express = require('express'), | |
http = require('http'), |
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
# sudo sh block.sh | |
-I INPUT 1 -p tcp --dport 80 -m string --string "ads.yahoo.com" --algo kmp -j DROP | |
-I INPUT 1 -p tcp --dport 80 -m string --string "ads.fcmrktplace.com" --algo kmp -j DROP | |
-I INPUT 1 -p tcp --dport 80 -m string --string "ads.creafi-online-media.com" --algo kmp -j DROP | |
-I INPUT 1 -p tcp --dport 80 -m string --string "ib.reachjunction.com" --algo kmp -j DROP | |
-I INPUT 1 -p tcp --dport 80 -m string --string "www.indeed.com" --algo kmp -j DROP | |
-I INPUT 1 -p tcp --dport 80 -m string --string "ib.adnxs.com" --algo kmp -j DROP | |
-I INPUT 1 -p tcp --dport 80 -m string --string "ad.tagjunction.com" --algo kmp -j DROP | |
-I INPUT 1 -p tcp --dport 80 -m string --string "ad.globe7.com" --algo kmp -j DROP | |
-I INPUT 1 -p tcp --dport 80 -m string --string "ads.clicksor.com" --algo kmp -j DROP |
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
### BEGIN INIT INFO | |
# Provides: transparentproxy | |
# Required-Start: $local_fs $syslog $remote_fs dbus | |
# Required-Stop: $local_fs $syslog $remote_fs | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Start transparentproxy | |
### END INIT INFO | |
# | |
# /etc/rc.d/init.d/webdriver |
OlderNewer