Skip to content

Instantly share code, notes, and snippets.

@designer2k2
designer2k2 / rpi_samba_install_headless.sh
Last active January 5, 2019 08:19
Install samba on a Raspberry Pi with sharing root config
#!/bin/sh
#this bash script installs samba sharing / and gives it to the pi user
apt-get update # To get the latest package lists
apt-get install samba samba-common-bin -y
#set pi password:
(echo raspberry; echo raspberry) | smbpasswd -a pi
#restart samba to ensure config is present
service smbd restart
service nmbd restart
#check if config is already ok:
@designer2k2
designer2k2 / artikel13.py
Created March 27, 2019 17:54
Scrapes the people in the european parliament and shows the voting result on Artikel 13
#load vote results, pdf parsing later, now using copy paste result
# AM271: http://www.europarl.europa.eu/sides/getDoc.do?pubRef=-//EP//NONSGML+PV+20190326+RES-RCV+DOC+PDF+V0//DE&language=DE
plusvote = u"ALDE:Ali, Arthuis, Bilbao Barandica, Calvet Chambon, Cavada, Cornillet, Deprez, Diaconu, Giménez Barbat, Grigule-Pēterse, Harkin, Hyusmenova, Jäätteenmäki, Jakovčić, Katainen, Lalonde, Løkkegaard, Marinho e Pinto, Mazuronis, Michel, Mihaylova, Nart, Pagazaurtundúa Ruiz, Petersen, Punset, Ries, Riquet, Rochefort, Rohde, Tremosa i Balcells, Uspaskich, Vajgl, Vautmans, Vehkaperä, Verhofstadt, WierinckECR:Bashir, Campbell Bannerman, Deva, Fitto, Foster, Fox, Henkel, Karim, Kölmel, Leontini, McClarkin, McIntyre, Matthews, Maullu, Messerschmidt, Mobarik, Nicholson, Sernagiotto, Swinburne, Tannock, Van Orden, Vistisen, ZīleEFDD:Bergeron, Chauprade, D'Ornano, Goddyn, Monot, PaksasENF:Arnautu, Bay, Bilde, Boutonnet, Briois, Colombier, Jalkh, Jamet, Lebreton, Lechevalier, Loiseau, Martin Dominique, Mélin, Schaffhauser,
@designer2k2
designer2k2 / ArduinoLoRaTheThingsNetworkExample.ino
Created January 30, 2020 19:31
Example to get the Dragino LoRa shield running on a Arduino Leonardo
/*******************************************************************************
* Copyright (c) 2015 Thomas Telkamp and Matthijs Kooijman
*
* Permission is hereby granted, free of charge, to anyone
* obtaining a copy of this document and accompanying files,
* to do whatever they want with them without any restriction,
* including, but not limited to, copying, modification and redistribution.
* NO WARRANTY OF ANY KIND IS PROVIDED.
*
* This example sends a valid LoRaWAN packet with payload "Hello,