Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
# obtains debian packages | |
# Examples: | |
# gimp on current directory from debian 6 | |
# curl -L https://goo.gl/jruRgy | bash -s gimp | |
# gimp on directory gimp-install-dir | |
# curl -L https://goo.gl/jruRgy | bash -s gimp gimp-install-dir | |
# only partial package of gimp (/usr/bin) |
# a fully automated script to configure an openvpn server and create the config for one user | |
# tested only on ubuntu | |
# Configurar un Servidor OpenVPN en Ubuntu 16.04 | |
# from https://www.digitalocean.com/community/tutorials/como-configurar-un-servidor-openvpn-en-ubuntu-16-04-es | |
server_name="NY-DO" | |
client_1=mauricio | |
port=443 | |
server_ip=$(dig +short myip.opendns.com @resolver1.opendns.com) |
# one-liner: | |
# curl -L https://goo.gl/H7iAZn | bash | |
# one liner with params: | |
# curl -L https://goo.gl/H7iAZn | bash -s myalpinedir x86_64 v3.4 | |
# one liner from yandex: | |
# curl -L https://goo.gl/H7iAZn | MIRROR_FILTER=yandex bash -s myalpinedir x86_64 v3.4 | |
chroot_dir=${1:-alpine} | |
arch=${2:-x86} #x86_64 | |
branch=${3:-latest-stable} |
# for more info https://wiki.alpinelinux.org/wiki/Installing_Alpine_Linux_in_a_chroot | |
# one-liner: | |
# curl -L https://goo.gl/huUs7L | bash | |
# one liner with params: | |
# curl -L https://goo.gl/huUs7L | bash -s myalpinedir x86_64 v3.4 | |
# one liner from yandex: | |
# curl -L https://goo.gl/huUs7L | MIRROR_FILTER=yandex bash -s myalpinedir x86_64 v3.4 | |
# get a random mirror from the available list | |
this_gist='https://gist.githubusercontent.com/mauricioprado00/1e40021b7e5a8bfdc8049e51b851d4b9/raw/' |
# requires (on ubuntu: apt-get install -y debootstrap) | |
thisdir=./squeeze-distro | |
# create chroot system | |
# debootstrap stable ${thisdir} http://ftp.us.debian.org/debian | |
debootstrap --arch i386 squeeze ${thisdir} http://archive.debian.org/debian/ | |
# mount devices | |
dirs=(/dev /dev/pts /dev/shm /tmp) |
#!/bin/bash | |
# usage go [params] | |
docker run -it --rm --name my-running-app -v $(pwd)/:/go/src -w /go/src/ golang:1.8 go $@ | |
# save it with: | |
# curl https://gist.githubusercontent.com/mauricioprado00/8ac58efebd6b7e94d043438cd9a1dbc6/raw/docker-go > /usr/local/bin/go | |
# chmod +x /usr/local/bin/go |
#!/usr/bin/env bash | |
cat <<EOF > /usr/local/etc/icinga-crontabs.sh | |
#!/usr/bin/env bash | |
function cleanup-dir() { | |
rm -Rf /icinga/crontabs | |
mkdir -p /icinga/crontabs | |
chmod -R 444 /icinga/ | |
chmod 555 /icinga /icinga/crontabs | |
} |
#!/bin/bash | |
# usage: | |
# git addmodified | |
git add $(git status --porcelain | awk '/^.M/{print $2}') | |
# New command for adding only modified files to stage | |
# save it with: |
#!/usr/bin/env bash | |
# requires: imagemagik, xdotool, xwininfo | |
# usage: click-by-image [image-file-to-search] [window partial title] [section x] [section y] [section width] [section height] | |
# section parameter is to cut the image of the window and make imagemagik faster | |
image_file=$1 | |
window_title=$2 | |
section_x=$3 | |
section_y=$4 |