Example .git/config
[remote "upstream"]
url = https://github.com/scikit-learn/scikit-learn
fetch = +refs/heads/*:refs/remotes/upstream/*
fetch = +refs/pull/*/head:refs/remotes/upstream/pr/*
Tuesday, July 22, 2014
Tuesday, July 8, 2014
Setup docker on CoreOS
A great intro to docker on CoreOS - it's as easy as
docker pull ubuntu
docker run -name="test" -t -i ubuntu /bin/bash
http://tonyhb.com/unsuck-your-vagrant-developing-in-one-vm-with-vagrant-and-docker
docker pull ubuntu
docker run -name="test" -t -i ubuntu /bin/bash
http://tonyhb.com/unsuck-your-vagrant-developing-in-one-vm-with-vagrant-and-docker
Saturday, June 7, 2014
Force google-chrome to start new session
This command will force Google Chrome to start a new session, and disables any proxy settings you currently have
google-chrome --user-data-dir=/tmp --no-proxy-server
google-chrome --user-data-dir=/tmp --no-proxy-server
Thursday, June 5, 2014
SOCKS proxy with firefox about:config and ssh
A simple socks proxy can be made as follows
First, open Firefox and type about:config in the address bar
change the following items
network.proxy.socks localhost
network.proxy.socks_port 4321
network.proxy.type 1
network.proxy.socks_remote_dns true
ssh to your favorite machine with the -D flag
i.e.
ssh -D 4321 root@myserver.com
This will setup a SOCKS proxy to myserver.com and also protect your DNS requests
Links:
http://bityard.blogspot.fr/2009/01/make-openssh-socks-proxy.html
First, open Firefox and type about:config in the address bar
change the following items
network.proxy.socks localhost
network.proxy.socks_port 4321
network.proxy.type 1
network.proxy.socks_remote_dns true
ssh to your favorite machine with the -D flag
i.e.
ssh -D 4321 root@myserver.com
This will setup a SOCKS proxy to myserver.com and also protect your DNS requests
Links:
http://bityard.blogspot.fr/2009/01/make-openssh-socks-proxy.html
Unmount busy filesystem and find process linux
sudo umount /mntumount: /mnt: device is busy.
(In some cases useful info about processes that use
the device is found by lsof(8) or fuser(1))
lsof /mntCOMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
bash 19005 user cwd DIR 8,17 4096 2 /mnt
sudo kill -9 19005
(In some cases useful info about processes that use
the device is found by lsof(8) or fuser(1))
lsof /mntCOMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
bash 19005 user cwd DIR 8,17 4096 2 /mnt
sudo kill -9 19005
Set iptables rulesets
Redirecting traffic to different ports - in this caser, redirect standard http requests and https requests to a server which doesn't run as root (all ports < 1000 require root access)
sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8080
sudo iptables -t nat -A PREROUTING -p tcp --dport 443 -j REDIRECT --to-port 8443
To show the new rules, do
iptables -t nat --list
sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8080
sudo iptables -t nat -A PREROUTING -p tcp --dport 443 -j REDIRECT --to-port 8443
To show the new rules, do
iptables -t nat --list
Subscribe to:
Comments (Atom)