httrack example.com -O ./example.com -N100 −%i0 -I0 --max-rate 0 --disable-security-limits --near -v
httrack example.com -O ./example.com-3 -N100 -I0 -N "%p/%n%[month].%t" --max-rate 0 --disable-security-limits --near -v
Create a simple web server for testing
while true; do { echo -e 'HTTP/1.1 200 OK\r\n'; cat index.html; } | nc -l 80; done
Create tunneling so that the web server can be accessible from Internet
Download ngrok from https://ngrok.com/download
# Install tmux 2.8 on Centos | |
# install deps | |
yum install gcc kernel-devel make ncurses-devel | |
# cd src | |
cd /usr/local/src | |
# DOWNLOAD SOURCES FOR LIBEVENT AND MAKE AND INSTALL | |
curl -LO https://github.com/libevent/libevent/releases/download/release-2.1.8-stable/libevent-2.1.8-stable.tar.gz |
/* | |
* Genarate rsa keys. | |
*/ | |
package main | |
import ( | |
"crypto/rand" | |
"crypto/rsa" | |
"crypto/x509" |
import com.squareup.okhttp.ResponseBody; | |
import okio.BufferedSink; | |
import okio.Okio; | |
import retrofit.Response; | |
import retrofit.http.GET; | |
import retrofit.http.Query; | |
import rx.Observable; | |
interface ApiService { |
function mapValues(obj, fn) { | |
return Object.keys(obj).reduce((result, key) => { | |
result[key] = fn(obj[key], key); | |
return result; | |
}, {}); | |
} | |
function pick(obj, fn) { | |
return Object.keys(obj).reduce((result, key) => { | |
if (fn(obj[key])) { |
How to Completely Remove Android Studio | |
Execute these commands from the terminal | |
rm -Rf /Applications/Android\ Studio.app | |
rm -Rf ~/Library/Preferences/AndroidStudio* | |
rm ~/Library/Preferences/com.google.android.studio.plist | |
rm -Rf ~/Library/Application\ Support/AndroidStudio* | |
rm -Rf ~/Library/Logs/AndroidStudio* |
## from example: https://github.com/ibmjstart/Microservices/tree/split ## | |
productapi: | |
build: ./services/productAPI | |
ports: | |
- "49760:8080" | |
cartapi: | |
build: ./services/cartAPI | |
ports: |
#!/bin/bash | |
#Check if user is root | |
if [ $UID != 0 ]; then | |
echo "You need to be root to use this script." | |
exit 1 | |
fi | |
echo "docker-nuke exists to do one thing; clean up your Docker environment. It's not called docker-carefully-and-nicely-spritz-up. Be carefully!" | |
echo |