Skip to content

Instantly share code, notes, and snippets.

@josvazg
josvazg / cloud-init.sample
Last active May 1, 2019 14:39
First boot cloud-init setup for a raspberry pi 3 ubuntu bionic arm64 image passing your SSH key and WIFI settings
#cloud-config
ssh_pwauth: false
chpasswd: { expire: False }
ssh_authorized_keys:
- "${SSH_KEY_CONTENTS}"
packages:
- iw
- wireless-tools
write_files:
- content: |

Keybase proof

I hereby claim:

  • I am josvazg on github.
  • I am josvaz (https://keybase.io/josvaz) on keybase.
  • I have a public key ASBm60iRIHQOa8hIBb-DqAs2k_5ToSyC11tH502yK3splAo

To claim this, I am signing this object:

@josvazg
josvazg / shipit.py
Created January 27, 2017 09:19
Ship it with --no-ff & comment conventions
#!/usr/bin/env python3
"""
Shipit script will shipt all commits from a given feature branch
as a single non fast forward merge, while adding the proper agreed upon
commit message formatting.
You must sit on a local clone of the target branch.
If you are happy with how shipit merged, you just "git push" the result
to the remote branch.
"""
#!/usr/bin/env python
import argparse
import tempfile
import subprocess
import traceback
def u(somebytes):
return None if somebytes is None else somebytes.decode('utf-8')
#josvaz-znc.conf Upstart script for (AWS) Ubuntu 14.04
#znc - irc bouncer
description "IRC bouncer."
start on runlevel [2345]
stop on runlevel [!2345]
respawn
setuid ubuntu
#Install ZNC
sudo apt-get update
sudo apt-get install znc
#Configure Timezone on server
echo "Europe/Madrid" | sudo tee /etc/timezone
sudo dpkg-reconfigure --frontend noninteractive tzdata
#This is for running on a EBS Only t2.micro instance (covered under the free tier)
#No need to mount EBS volume separately, root fs is already RW and EBS backed