Skip to content

Instantly share code, notes, and snippets.

View jonasrosland's full-sized avatar

Jonas Rosland jonasrosland

View GitHub Profile
@jonasrosland
jonasrosland / docker-swarm-data-persistence.md
Last active August 23, 2020 02:19
Use Docker Swarm with a data persistence layer

Use Docker Swarm with a data persistence layer

Create a Docker Swarm discovery token

curl -X POST https://discovery.hub.docker.com/v1/clusters
YOURSWARMTOKEN

Export the correct environment variables

@jonasrosland
jonasrosland / README.md
Last active January 3, 2016 09:13
YouTube Playlist Statistics widget for the Dashing dashboard

YouTube Playlist Statistics widget for the Dashing dashboard

Enables tracking of all video views stats in a playlist.

Sample HTML to put in your .erb file:

    <li data-row="1" data-col="2" data-sizex="4" data-sizey="1" onclick="location.href='https://www.youtube.com/playlist?list=PLbssOJyyvHuWiBQAg9EFWH570timj2fxt';">
 
@jonasrosland
jonasrosland / README.md
Last active May 1, 2016 16:45
Wordpress Statistics widget for the Dashing dashboard

Wordpress Statistics widget for the Dashing dashboard

Tracks all time total stats and views per post

Sample HTML to put in your .erb file:

    <li data-row="1" data-col="1" data-sizex="1" data-sizey="1">
 
@jonasrosland
jonasrosland / KSP-Missions.md
Last active September 30, 2015 00:55
KSP Planned missions

Satellite missions

  • Set up communication satellites around Moho
    • 3 Satellites
      • 1 Communotron 88-88 for relaying back to Kerbin
      • 3 Comms DTS-M1 for keeping in contact with eachother and other craft on the surface
  • Set up communication satellites around Duna

Manned missions

sudo useradd consul
sudo mkdir -p /etc/consul.d/{bootstrap,server,client}
sudo mkdir /var/consul
sudo chown consul:consul /var/consul
wget -nc -nv https://releases.hashicorp.com/consul/0.6.4/consul_0.6.4_linux_amd64.zip 1&>2
unzip -o consul_0.6.4_linux_amd64.zip
sudo cp consul /usr/local/bin
if [ "$HOSTNAME" = mesos-master ]; then
echo "on master"
{
"id": "redis",
"container": {
"docker": {
"image": "redis",
"network": "BRIDGE",
"portMappings": [
{ "containerPort": 6379, "hostPort": 0, "protocol": "tcp"}
],
"parameters": [
@jonasrosland
jonasrosland / public_networks.json
Last active April 22, 2016 20:45
cf security-group public_networks
[
{
"destination": "0.0.0.0-9.255.255.255",
"protocol": "all"
},
{
"destination": "11.0.0.0-169.253.255.255",
"protocol": "all"
},
{

Keybase proof

I hereby claim:

  • I am jonasrosland on github.
  • I am jonasrosland (https://keybase.io/jonasrosland) on keybase.
  • I have a public key whose fingerprint is 1CBB 1DA3 A219 A86E B322 45CF 105A 90BB 3887 0BD2

To claim this, I am signing this object:

@jonasrosland
jonasrosland / remove-ckan.sh
Created September 24, 2016 01:47
Remove all CKAN mods with a single line
# This will remove all your installed Kerbal Space Program mods, use with caution!
for each in $(ckan list | grep "-" | awk '{print $2}') do; yes | ckan remove $each
@jonasrosland
jonasrosland / rexray-aws.sh
Last active December 6, 2016 20:54
REX-Ray installation on AWS
curl -sSL https://get.docker.com/ | sh
curl -sSL https://dl.bintray.com/emccode/rexray/install | sh -s -- stable
sudo tee -a /etc/rexray/config.yml << EOF
rexray:
storageDrivers:
- ec2
aws:
accessKey: $AWS_ACCESS_KEY
secretKey: $AWS_SECRET_KEY
EOF