download latest version https://golang.org/dl/
wget https://storage.googleapis.com/golang/go1.7.linux-amd64.tar.gz
tar xzvf go1.7.linux-amd64.tar.gz
extract file and install
sudo tar -C /usr/local -xvzf go1.7.linux-amd64.tar.gz
| # Optimized my.cnf configuration for MySQL/MariaSQL on cPanel/WHM servers | |
| # | |
| # by Fotis Evangelou, developer of Engintron (engintron.com) | |
| # | |
| # === Updated July 2018 === | |
| # | |
| # The settings provided below are a starting point for a 2GB - 4GB RAM server with 2-4 CPU cores. | |
| # If you have less or more resources available you should adjust accordingly to save CPU, | |
| # RAM and disk I/O usage. | |
| # The settings marked with a specific comment or the word "UPD" after the value | 
download latest version https://golang.org/dl/
wget https://storage.googleapis.com/golang/go1.7.linux-amd64.tar.gz
tar xzvf go1.7.linux-amd64.tar.gz
extract file and install
sudo tar -C /usr/local -xvzf go1.7.linux-amd64.tar.gz
| #!/bin/bash | |
| # To avoid doing things like putting your mysql password on the cli which is not secure | |
| # Use mysql config editor http://dev.mysql.com/doc/refman/5.6/en/mysql-config-editor.html | |
| for table in $(mysql --login-path=mylogins -D database_name -Bse "show tables"); | |
| do mysql --login-path=mylogins -D database_name -Bse "analyze table $table"; | |
| done | 
Let’s see how to use PostgreSQL to import and export CSV files painlessly with the COPY command.
Import CSV into table t_words:
COPY t_words FROM '/path/to/file.csv' DELIMITER ',' CSV;You can tell quote char with QUOTE and change delimiter with DELIMITER.
| -- show running queries (pre 9.2) | |
| SELECT procpid, age(query_start, clock_timestamp()), usename, current_query | |
| FROM pg_stat_activity | |
| WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
| ORDER BY query_start desc; | |
| -- show running queries (9.2) | |
| SELECT pid, age(query_start, clock_timestamp()), usename, query | |
| FROM pg_stat_activity | |
| WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' | 
| for i in $(seq 1 6000000) | |
| do | |
| echo SERVER$((RANDOM%800+100)),$RANDOM,$RANDOM,$RANDOM >> sample2.csv | |
| done | 
| #!/bin/sh | |
| mysql -uroot -hlocalhost --local-infile=1 tableName << Eof | |
| load data local infile "data.csv" into table server FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n' | |
| ; | |
| Eof | 
| defmodule Tcprpc.Server do | |
| use GenServer.Behaviour | |
| defrecord State, port: nil, lsock: nil, request_count: 0 | |
| def start_link(port) do | |
| :gen_server.start_link({ :local, :tcprcp }, __MODULE__, port, []) | |
| end | |
| def start_link() do | 
| <form action="" enctype="multipart/form-data" method="post"> | |
| <input id="file" name="file" type="file" /> | |
| <input id="Submit" name="submit" type="submit" value="Submit" /> | |
| </form> | 
| <?php | |
| $URIParts = explode('?',$_SERVER['REQUEST_URI']); | |
| $URI = explode('/',$URIParts[0]); | |
| // Shift the array, to move it past the 'root' | |
| @array_shift($URI); | |
| // Now, get rid of any pesky empty end slashes | |
| while ( @count($URI) > 0 && !end($URI) ) { | |
| @array_pop($URI); | |
| } |