This file contains 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 | |
echo "time_connect \t time_appconnect \t time_pretransfer \t time_starttransfer\n" | |
# Run 100 times | |
for i in `seq 1 100`; do curl -H "Authorization: Bearer 1234" -s -o /dev/null -w '%{time_connect}, %{time_appconnect}, %{time_pretransfer}, %{time_starttransfer}\n' "https://mgmt.auth.sample.com/esm/v2.1/media-company/year/month?media-company=Discovery&requestor-id=&proxy=&mvpd=Comcast"; done | |
This file contains 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
testing ports... | |
sudo lsof -i :9000 | |
netstat -Aa | grep 9000 |
This file contains 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 lsof -n iTCP:<port_number> |
This file contains 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
// A Factorial in C++ | |
#include <iostream> | |
using namespace std; | |
long factorial (long fac) | |
{ | |
if (fac > 1) | |
return (fac * factorial (fac-1)); | |
else | |
return 1; |
This file contains 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
composer global require "fxp/composer-asset-plugin:1.0.0-beta3" |
This file contains 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 apt-get install libapache2-mod-php5 | |
sudo apt-get install libcurl3 (-f) | |
sudo apt-get install libapache2-mod-mysql | |
sudo apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql | |
sudo apt-get install software-properties-common | |
sudo add-apt-repository ppa:ondrej/php5-5.6 | |
sudo apt-get update | |
sudo apt-get upgrade | |
sudo apt-get install php5 |
This file contains 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
ssh user@host cat /path/to/remotefile | diff /path/to/localfile - |
This file contains 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
git filter-branch --prune-empty -d /dev/shm/scratch --index-filter "git rm --cached -f --ignore-unmatch <filename>" --tag-name-filter cat -- --all |
This file contains 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 parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} | |
export PS1="\u@\h \[\033[32m\]\w\[\033[33m\]\$(parse_git_branch)\[\033[00m\] $ " |
This file contains 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
echo 'flush_all' | nc localhost 11211 |
NewerOlder