Copy the following into a file (which I named "xterm-256color.terminfo.txt")
xterm-256color|xterm with 256 colors and italic,
sitm=\E[3m, ritm=\E[23m,
use=xterm-256color,
Next execute the following comand:
Copy the following into a file (which I named "xterm-256color.terminfo.txt")
xterm-256color|xterm with 256 colors and italic,
sitm=\E[3m, ritm=\E[23m,
use=xterm-256color,
Next execute the following comand:
To find out the source ip of SIP forwarding: Start a dummy sip server (on Digital Ocean):
nc -l -u -v 5060
Then choose to forward the sip to sip@do-server-ip When the SIP forward the package, in the console log there will be its details being dumped
| #!/usr/bin/env ruby | |
| # Usage: ./decode_mobile_keypad.rb 44 33 555 555 666 | |
| KEYS = { | |
| "1" => [], "2" => ['a','b','c'], "3" => ['d','e','f'], | |
| "4" => ['g','h','i'], "5" => ['j','k','l'], "6" => ['m','n','o'], | |
| "7" => ['p','q','r','s'], "8" => ['t','u','v'], "9" => ['w','x','y','z'] | |
| } | |
| ARGV.each do|a| | |
| size = a.size - 1 | |
| print KEYS[a[0]][size] |
| # Update, upgrade and install development tools: | |
| apt-get update | |
| apt-get -y upgrade | |
| apt-get -y install build-essential libssl-dev | |
| apt-get -y install git-core | |
| apt-get -y install autoconf bison build-essential libssl-dev\ | |
| libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm3 libgdbm-dev | |
| # Install rbenv | |
| git clone git://github.com/sstephenson/rbenv.git /usr/local/rbenv |
| # Load balancer configuration | |
| upstream exampleApp { | |
| # Directs to the process with least number of connections. | |
| least_conn; | |
| # One failed response will take a server out of circulation for 20 seconds. | |
| server 127.0.0.1:10080 fail_timeout=20s; | |
| #server 127.0.0.1:10081 fail_timeout=20s; | |
| #server 127.0.0.1:10082 fail_timeout=20s; | |
| #server 127.0.0.1:10083 fail_timeout=20s; |
| # SSL self signed localhost for rails start to finish, no red warnings. | |
| # 1) Create your private key (any password will do, we remove it below) | |
| $ openssl genrsa -des3 -out server.orig.key 2048 | |
| # 2) Remove the password | |
| $ openssl rsa -in server.orig.key -out server.key |