- node.js
- Installation paths: use one of these techniques to install node and npm without having to sudo.
- Node.js HOWTO: Install Node+NPM as user (not root) under Unix OSes
- Felix's Node.js Guide
- Creating a REST API using Node.js, Express, and MongoDB
- Node Cellar Sample Application with Backbone.js, Twitter Bootstrap, Node.js, Express, and MongoDB
- JavaScript Event Loop
- Node.js for PHP programmers
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
%s/\(\d\)-\(\d\{3}\)-\(\d\{3}\)-\(\d\{4}\)/\1\2\3\4/g |
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 | |
eval `ssh-agent` | |
ssh-add |
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
Document doc = Jsoups.getDocByUrl(url); | |
TPGoods goods = new TPGoods(); | |
goods.setId(Long.valueOf(url.substring(url.lastIndexOf("/") + 1, url.lastIndexOf("x.shtml")))); | |
goods.setRealUrl(url); | |
/* main */ | |
Element main = doc.getElementById("main").getElementsByTag("div").first(); | |
Element title = main.select("h1").first(); | |
goods.setTitle(title.html()); | |
Element time = main.select("li.time").first(); |
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 | |
START_PORT=7100 | |
COUNT=6 | |
for port in $(seq $START_PORT `expr $START_PORT + $COUNT - 1`) | |
do | |
dir="`pwd`/$port" | |
mkdir $dir | |
conf_file="$dir/$port.conf" |
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/sh | |
IPT=/sbin/iptables | |
LOCAL_IFACE=eth0 | |
INET_IFACE=wlan0 | |
INET_ADDRESS=192.168.21.231 | |
# Flush the tables | |
$IPT -F INPUT | |
$IPT -F OUTPUT | |
$IPT -F FORWARD |
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
0xa49E3733b98e34F2ad30559200f9c5D86f806a12 |
Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma
You can get the list of supported formats with:
ffmpeg -formats
Convert WAV to MP3, mix down to mono (use 1 audio channel), set bit rate to 64 kbps and sample rate to 22050 Hz:
OlderNewer