Open terminal and type:
1. Create a directory at ~/bin:
mkdir ~/bin
2. Copy sublime executable to your ~/bin directory:
| <?php | |
| function get_web_page( $url ){ | |
| $options = array( | |
| CURLOPT_RETURNTRANSFER => true, // return web page | |
| CURLOPT_HEADER => false, // don't return headers | |
| CURLOPT_FOLLOWLOCATION => true, // follow redirects | |
| CURLOPT_ENCODING => "", // handle all encodings | |
| CURLOPT_USERAGENT => "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17", // who am i | |
| CURLOPT_AUTOREFERER => true, // set referer on redirect |
| #!/usr/bin/env bash | |
| # This script prints out all of your Redis keys and their size in a human readable format | |
| # Copyright 2013 Brent O'Connor | |
| # License: http://www.apache.org/licenses/LICENSE-2.0 | |
| human_size() { | |
| awk -v sum="$1" ' BEGIN {hum[1024^3]="Gb"; hum[1024^2]="Mb"; hum[1024]="Kb"; for (x=1024^3; x>=1024; x/=1024) { if (sum>=x) { printf "%.2f %s\n",sum/x,hum[x]; break; } } if (sum<1024) print "1kb"; } ' | |
| } |
_________ _____ _______________ _____
\_ ___ \\ \\___________ \____ / ____\ ~/.bash/cliref.md
/ \ \/| | | || _/ __ \ __\ copy/paste from whatisdb
\ \___|__ |_|_ || | \ __/|_ | http://pastebin.com/yGmGiDQX
\________ /_____ \_||____|_ /____ /_| yunga.palatino@gmail.com
20160515 \/ 1527 \/ \/ \/
alias CLIRef.txt='curl -s "http://pastebin.com/raw/yGmGiDQX" | less -i'
| import java.io.FileDescriptor; | |
| import java.io.FileOutputStream; | |
| import java.io.IOException; | |
| import java.io.OutputStream; | |
| import java.io.PrintStream; | |
| public class HelloWorld{ | |
| private static HelloWorld instance; | |
| public static void main(String[] args){ | |
| instantiateHelloWorldMainClassAndRun(); |
Dockerfile that is based on your production image and
simply install xdebug into it. Exemple:FROM php:5
RUN yes | pecl install xdebug \
&& echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \
| # This is just a cheat sheet: | |
| # On production | |
| sudo -u postgres pg_dump database | gzip -9 > database.sql.gz | |
| # On local | |
| scp -C production:~/database.sql.gz | |
| dropdb database && createdb database | |
| gunzip < database.sql.gz | psql database |
| Server | Price* | CPU (1 thread) | CPU (4 threads) | IO |
|---|---|---|---|---|
| Scaleway Start1-XS Atom C3955, 25G NVMe |
$4 | 21 sec P₉₅ = 2.1ms |
21 sec P₉₅ = 14ms |
🚗 653 IO/s, 10 Mb/sec P₉₅ = 0.40ms |
| Scaleway VC1-S Atom C2750, 50G SSD |
$4 | 46 sec P₉₅ = 4.6ms |
23 sec P₉₅ = 14ms |
🚲 289 IO/s, 4.5 Mb/sec P₉₅ = 0.39ms |
| Hetzner CPX11 AMD EPYC, 40G SSD |
$5 | 20 sec P₉₅ = 3.2ms |
9.6 sec P₉₅ = 11ms |
P₉₅ = 0.29ms |
| Hetzner CX21 Intel Xeon, 40G SSD |
$6 | 24 sec P₉₅ = 2.8ms |
12.5 sec P₉₅ = 11ms |
🚤 1946 IO/s, 30 Mb/sec P₉₅ = 0.97ms |
| AWS t2.micro 1G*Intel E5-2676 v3 2.4 |