Let's have some command-line fun with curl, [jq][1], and the [new GitHub Search API][2].
Today we're looking for:
// DON'T FORGET TO IMPORT proxy.conf TOO | |
[General] | |
loglevel = notify | |
skip-proxy = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12,127.0.0.0/24 | |
bypass-tun = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12,127.0.0.0/24 | |
// DNS OVERRIDE, REMOVE # IF YOU NEED | |
# dns-server = 223.6.6.6,223.5.5.5,114.114.114.114,114.114.115.115 |
[General] | |
# warning, notify, info, verbose | |
loglevel = notify | |
bypass-system = true | |
skip-proxy = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, localhost, *.local | |
bypass-tun = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12 | |
dns-server = 114.114.114.114,119.29.29.29,8.8.8.8 | |
[Proxy] | |
# http, https, socks5 |
# This config file was created for myself (@janlay). You may want to add or remove some rules to make efficient use of the Internet. | |
# This file depends on the main.conf which defines your own proxy. | |
# Your main.conf will look like this: | |
# ---- START ---- | |
# #!PROXY-OVERRIDE:rules.conf | |
# [Proxy] | |
# Proxy = https,server.address,port,username,password | |
# ---- END ---- | |
# |
Let's have some command-line fun with curl, [jq][1], and the [new GitHub Search API][2].
Today we're looking for:
When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:
var Article = require('../../../models/article');
Those suck for maintenance and they're ugly.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
. ~/.bashrc | |
mkdir ~/local | |
mkdir ~/node-latest-install | |
cd ~/node-latest-install | |
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
./configure --prefix=~/local | |
make install # ok, fine, this step probably takes more than 30 seconds... | |
curl https://www.npmjs.org/install.sh | sh |
// this is the background code... | |
// listen for our browerAction to be clicked | |
chrome.browserAction.onClicked.addListener(function (tab) { | |
// for the current tab, inject the "inject.js" file & execute it | |
chrome.tabs.executeScript(tab.ib, { | |
file: 'inject.js' | |
}); | |
}); |
Use brew
to install the ModSecurity Apache module.
brew install homebrew/apache/mod_security
Ask Apache to load the module by editing the configuration file (at /etc/apache2/httpd.conf
). Under the long list of LoadModule
statements, add:
LoadModule security2_module /usr/local/Cellar/mod_security/2.7.7/libexec/mod_security2.so
While you are at it, load the mod_unique_id
module as well. This is required by ModSecurity. Do so by uncommenting the line: