Skip to content

Instantly share code, notes, and snippets.

If your browser downloads the file instead of displaying it?
sudo apt-get install libapache2-mod-php5 -y
After that enable php for apache
a2enmod php5
Restart server
sudo service apache2 restart
2.2 configuration:
Order deny,allow
Deny from all
2.4 configuration:
Require all denied
In this example, all requests are allowed.
From remote to local
scp -i '/PATH/TO/YOURPEM.pem' -r USER@PUBLIC_IP:/SPECIFY/PATH/*.ini /PATH/TO/FILES/
From local to remote
scp -i '/PATH/TO/YOURPEM.pem' PATH/TO/FILE/YOU/WANT/TO/COPY/* USER@PUBLIC_IP:
memcached -d -m 2048 -M -p 11211
@teddevaal
teddevaal / gist:596221cdb01305a34d42
Created September 11, 2014 09:07
Unique records
array.uniq.map { | e | [array.count(e), e] }.select { | c, _ | c > 1 }.sort.reverse.map { | c, e | "#{e}:#{c}" }
@teddevaal
teddevaal / gist:45f388d27a4e3f81d884
Created September 26, 2014 11:23
write output to .txt
script > script_output.txt 2>&1
@teddevaal
teddevaal / gist:7302c9c00f6b5aed3bb4
Created September 30, 2014 14:31
Packet tracer a la wireshark op je appelflap
sudo tcpdump -A -s0 -ien4 port 3306
@teddevaal
teddevaal / gist:394e7f73f2e48b37ec55
Created October 13, 2014 12:27
Execute java with jar
Compile
javac -cp json-20131018.jar Forecast.java
Execute
java -cp json-20131018.jar: Forecast
SSLProtocol -SSLv3
nc IP-ADDRESS PORT < /dev/null; echo $?