Skip to content

Instantly share code, notes, and snippets.

@snoerenberg
snoerenberg / boxstarter_newtelco.ps1
Created February 23, 2020 16:22 — forked from ndom91/boxstarter_newtelco.ps1
Newtelco Windows Setup Script [boxstarter, choco, PS3.0+]
###################################################
#
# Newtelco Windows PC Setup Script
# Author: ndomino@newtelco.de
# Date: 05.04.19
#
###################################################
# Install Boxstarter (run in a PowerShell (Administrator) shell)
Set-ExecutionPolicy RemoteSigned
@snoerenberg
snoerenberg / setup-windows.cmd
Last active February 15, 2020 14:59
Chocolatey default
@echo off
:: Paste the next line in an admin prompt to install packages (at your own risk!)
:: cmd /V:on /C "set url=https://gist.github.com/snoerenberg/f70f1e20bea64ba6370cdb5455392b3b/raw & set batchfile=!temp!\install-packages-!RANDOM!.cmd & bitsadmin /transfer getbat /download /priority normal !url! !batchfile! & call !batchfile! & del !batchfile!"
@setlocal EnableDelayedExpansion
set packages=
for %%a in (
adobereader
firefox
7zip.install
@snoerenberg
snoerenberg / Keywish Info
Last active July 1, 2020 12:07
Keywish BLE Nano for Geofency iOS
- attach Keywish BLE Nano to USB on PC
- check which serial port is present
- open serial monitor/console
Configure:
AT+SETTING=DEFAULT
-> factory reset (just to make sure)
AT+MINI_INTERVAL=20
@snoerenberg
snoerenberg / serialinstall.txt
Last active May 29, 2019 20:03
Serial Install
1. PiBakery Mac download: https://www.pibakery.org/docs/install-mac.html
2. Download PiBakery Recipe https://gist.githubusercontent.com/snoerenberg/11b266ef2c0dcb8fbf638be40bf1177f/raw/4a1cb56ccb98039e9354ada92f07b848483f79c2/SerialPiBakery.xml
3. Insert SD Card to Mac
4. Start PiBakery, import recipe xml, make changes to hostname etc. if necessary
5. write to SD card with PiBakery
4. Insert SD in Raspberry Pi, connect ethernet, power on, wait :)
@snoerenberg
snoerenberg / SerialPiBakery.xml
Created May 29, 2019 19:55
Serial PiBakery Recipe
<xml xmlns="http://www.w3.org/1999/xhtml"><block type="onfirstboot" id="onfirstboot" x="105" y="43"><next><block type="packageinstall" id="Q;J;V@hCCJdI;uLhM=4W"><field name="1">python3-pip</field><next><block type="sethostname" id="MiG]@UpqBSk8qH%/IeWl"><field name="1">cardreader01</field><next><block type="changepass" id="5DE){[f=xya.}:P*H?xo"><field name="1">cardreader01pw</field><next><block type="runcommand" id="=pCYhrjZ#TL{hUWplv9-"><field name="1">pip3 install flask pyserial</field><field name="2">root</field><next><block type="downloadfile" id="SI`xk]Ml941+lHJgpr*)"><field name="1">https://gist.github.com/snoerenberg/8ed05ff7b9d63243c7cd573f3b8ca0c2/raw/ddaa5f4e3506ce46b9486701c4dbdf5bf29abe93/serialrestapp.py</field><field name="2">/home/pi/serialrestapp.py</field><next><block type="authorizekey" id="u1bf][ZorX~8|dHAx?9a"><field name="1">ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDu/P7/qX56dgAhPcg3YrinvDYKlUiC0ZiCOTWAQbgRN6bF0/WyJk/y3IQT5yDIZAy+PALVcT9dVVhQGZypeM92dsahxgcd/SfqA7xDlmtdy8bqLyPQdieAdw+wd0C318
@snoerenberg
snoerenberg / serialrestapp.py
Created May 28, 2019 16:11
Python script to reading from serial with REST API
from flask import Flask
import serial
app = Flask(__name__)
@app.route('/')
def index():
return 'Hello world'
@app.route('/getCardNumber')