Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
An example implementation of the self-pipe trick in Ruby, by Paul Annesley (found here: http://pastebin.com/1SZprwZm)
Further reading:
man 2 select
# see the changes for a file, even if it was deleted | |
git log -- [file_path] | |
# limit the output to only the last commit that touched the file | |
git log -1 -- [file_path] | |
# include some statistics, eg. how many files were deleted | |
git log -1 --stat -- [file_path] |
Apache Oozie | |
============= | |
What is Oozie | |
-------------- | |
Oozie is an extensible, scalable and reliable system to define, manage, schedule, and execute complex Hadoop workloads via web services. More specifically, this includes: | |
* XML-based declarative framework to specify a job or a complex workflow of dependent jobs. | |
* Support different types of job such as Hadoop Map-Reduce, Pipe, Streaming, Pig, Hive and custom java applications. |
# OS X Go Setup | |
# Assumes: | |
# + Homebrew has been installed correctly. | |
# + Homebrew-cask has been tapped and installed correctly. | |
# Install Go lang latest (1.1.1 as of May 13, 2013) | |
############################################################################### | |
brew install go |
<% if @colo == "a" then -%> | |
server server1 foo1.com:8088 check port 8088 inter 5000 rise 2 fall 3 maxconn 5000 | |
server server2 foo2.com:8088 check port 8088 inter 5000 rise 2 fall 3 maxconn 5000 | |
server server3 foo3.com:8088 check port 8088 inter 5000 rise 2 fall 3 maxconn 5000 | |
<% elsif @colo == "b" then -%> | |
server server1 foo1.com:8088 check port 8088 inter 5000 rise 2 fall 3 maxconn 5000 | |
server server2 foo2.com:8088 check port 8088 inter 5000 rise 2 fall 3 maxconn 5000 | |
server server3 foo3.com:8088 check port 8088 inter 5000 rise 2 fall 3 maxconn 5000 | |
<% elsif @colo == "c" then -%> | |
server server1 foo1.com:8088 check port 8088 inter 5000 rise 2 fall 3 maxconn 5000 |
global | |
log 127.0.0.1 local1 info info | |
user haproxy | |
group haproxy | |
daemon | |
#quiet | |
#debug | |
stats socket /var/run/haproxy/haproxy.sock mode 0600 level admin | |
defaults |
Adding a serverA ipA:portA to the 'query_backend': | |
echo "add server query_backend/serverA ipA:portA check inter 3000 rise 2 fall 3 maxconn 50" | socat stdio unix-connect:/var/haproxy.socket | |
Removing serverA again: | |
echo "remove server query_backend/serverA" | socat stdio unix-connect:/var/haproxy.socket |
#!/bin/bash | |
while : | |
do | |
clear | |
git --no-pager log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%ci) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative --all | |
sleep 1 | |
done |