Skip to content

Instantly share code, notes, and snippets.

View jmcarbo's full-sized avatar

Joan Marc Carbo jmcarbo

  • -
  • Barcelona (SPAIN)
View GitHub Profile
#!/usr/bin/env bash
# This script install PhantomJS in your Debian/Ubuntu System
#
# This script must be run as root:
# sudo sh install_phantomjs.sh
#
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root" 1>&2
exit 1
apt-get install dmsetup
dmsetup mknodes
apt-get install docker-engine
package main
import (
"encoding/json"
"fmt"
"io/ioutil"
"log"
"net/http"
"net/url"
"os"
docker run -ti --rm -v $PWD:/go/src -w /go/src -e GOOS=windows -e GOARCH=amd64 golang:windowsservercore /bin/bash -c "git clone https://github.com/restic/restic && cd restic && go run build.go"
docker run -ti -v $PWD/tmp:/go/src golang /bin/bash -c 'cd /go/src; git clone https://github.com/restic/restic; cd restic; go run build.go'
echo "1" > /proc/sys/net/ipv4/ip_forward
insmod /lib/modules/nf_nat.ko
insmod /lib/modules/nf_nat_ipv4.ko
iptables -t nat -A POSTROUTING -s 192.168.2.0/24 -j MASQUERADE
docker service create --name caddyproxy -p 80:80 -p 443:443 --mount "type=bind,source=/btsync/caddy/Caddyfile,destination=/etc/Caddyfile" --network proxy --network apps --mount "type=bind,source=/btsync/caddy/caddy,destination=/root/.caddy" --mount "type=bind,source=/btsync/caddy/certs,destination=/certs" --mount "type=bind,source=/btsync/caddy/logs,destination=/logs" abiosoft/caddy
docker service create --name btsync --mode global --mount "type=bind,source=/btsync,destination=/data" --network btsync jmcarbo/btsync AAAAAAAAAA
docker run -d -p 1080:8787 -e USER=lnonell -e USERID=1000 -v //c/Users/lnonell/dockertest:/home/rstudio rocker/rstudio
orgalorg -o 192.168.10.6 -u deploy -k ~/.ssh/imim2016 -C 'echo password | sudo -S do-release-upgrade -f DistUpgradeViewNonInteractive'