Skip to content

Instantly share code, notes, and snippets.

Avatar

Leo Gaggl leogaggl

View GitHub Profile
View keybase.md

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:

@leogaggl
leogaggl / lora_join.py
Created May 22, 2017
LoPy - The Things Network Australia
View lora_join.py
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')
View users.sls
# 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 / users.sls
Created Jan 28, 2018
Pillar example
View users.sls
users:
tester:
fullname: Joe Test
shell: '/bin/bash'
groups:
- sudo
crypt: longrandomSHA512hashedpassword
pub_ssh_keys:
- ssh-rsa 123456789aBcDeFgH123456789aBcDeFgH123456789aBcDeFgH123456789aBcDeFgH123456789aBcDeFgH123456789aBcDeFgH user@mailbox
@leogaggl
leogaggl / cloneall.sh
Created Apr 10, 2019 — forked from potter0815/cloneall.sh
clone all private repos of an organization
View cloneall.sh
#!/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"