Skip to content

Instantly share code, notes, and snippets.

View leogaggl's full-sized avatar

Leo Gaggl leogaggl

View GitHub Profile
@leogaggl
leogaggl / cloneall.sh
Created April 10, 2019 10:43 — forked from potter0815/cloneall.sh
clone all private repos of an organization
#!/bin/bash
#requires jq -> http://stedolan.github.io/jq/
#optional change working_dir
working_dir=${1-$(pwd)}
cd $working_dir
user="github_username"
token="application token"
organization="Organization_Name"
@leogaggl
leogaggl / users.sls
Created January 28, 2018 09:28
Pillar example
users:
tester:
fullname: Joe Test
shell: '/bin/bash'
groups:
- sudo
crypt: longrandomSHA512hashedpassword
pub_ssh_keys:
- ssh-rsa 123456789aBcDeFgH123456789aBcDeFgH123456789aBcDeFgH123456789aBcDeFgH123456789aBcDeFgH123456789aBcDeFgH user@mailbox
@leogaggl
leogaggl / users.sls
Created January 28, 2018 09:24
User state
# loop over all users presented by pillar:
# create user's group, create user, then add pub keys
{% for username, details in pillar.get('users', {}).items() %}
{{ username }}:
group:
- present
- name: {{ username }}
- gid: {{ details.get('gid', '') }}
@leogaggl
leogaggl / lora_join.py
Created May 22, 2017 06:12
LoPy - The Things Network Australia
from network import LoRa
import time
import binascii
import pycom
pycom.heartbeat(False) #needs to be disabled for LED functions to work
pycom.rgbled(0x7f0000) #red
#Set AppEUI and AppKey - use your values from the device settings --> https://console.thethingsnetwork.org/
app_eui = binascii.unhexlify('1234567890ABCDEF')

Keybase proof

I hereby claim:

  • I am leogaggl on github.
  • I am leogaggl (https://keybase.io/leogaggl) on keybase.
  • I have a public key whose fingerprint is 5644 5BF8 A121 61A0 790D B870 1417 399E 8CCA EDFD

To claim this, I am signing this object: