Skip to content

Instantly share code, notes, and snippets.

View toke's full-sized avatar

Thomas Kerpe toke

View GitHub Profile
@toke
toke / SonoffTouch.md
Last active March 1, 2017 15:10
Flash Sonoff Touch
<!doctype html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="de"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="de"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9" lang="de"> <![endif]-->
<!--[if IE]> <html class="no-js is-ie" lang="de"> <![endif]-->
<!--[if gt IE 8]><!-->
<html class="no-js" lang="de"> <!--<![endif]-->
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<meta charset="utf-8"/><!--|5886970|-->

Keybase proof

I hereby claim:

  • I am toke on github.
  • I am toke (https://keybase.io/toke) on keybase.
  • I have a public key whose fingerprint is B5AD 7FCB 270D A762 46D2 A8F2 B0E6 5607 ABE5 7238

To claim this, I am signing this object:

@toke
toke / gy-30.bash
Last active March 13, 2017 09:32
Lux sensor GY-30 test script
#!/usr/bin/env bash
#
# Lux sensor GY-30 test script
# http://rohmfs.rohm.com/en/products/databook/datasheet/ic/sensor/light/bh1750fvi-e.pdf
#
i2cset -y 0 0x23 0x10
sleep 0.2
i2cget -y 0 0x23 0x24 w
@toke
toke / ansible-vault-pass.bash
Last active October 24, 2021 21:38
Small helper script for usage with ansible-vault and ansible-playbook together with pass https://www.passwordstore.org/ Two implementations: first in bash and anotger one in python, which should be better as the git config hack to get ini files may fail due to incompatibilities in git vs. ansible ini style. The bash version is kept for reference.
#!/usr/bin/env bash
set -e
#
# Written by Thomas Kerpe <toke@toke.de> - Public Domain
#
# Small helper script for usage with ansible-vault and ansible-playbook
# together with [pass](https://www.passwordstore.org/)
#
# Say you have stored the vault-password for the current ansible playbook in pass
@toke
toke / README.md
Last active June 8, 2016 20:23
cluster ssh to clusters via DNS SRV RR

Cluster ssh into a cluster via DNS SRV RR's.

Example:

# Looking up SSH Endpoints
$ host -t SRV _ssh._tcp.service.domain.tld
_ssh._tcp.service.domain.tld IN SRV 0 1 22 a.service.domain.tld.
_ssh._tcp.service.domain.tld IN SRV 0 1 22 b.service.domain.tld.
@toke
toke / random_name.rb
Created February 23, 2016 12:59 — forked from monkbroc/random_name.rb
Random thingy name generator, like pleasant_cat and smooth_duck
#!/usr/bin/env ruby
require 'highline/import'
ADJECTIVES = %w(
broad crooked curved deep even flat hilly jagged round shallow square
steep straight thick thin triangular uneven average big fat gigantic
huge large little long massive medium miniature narrow petite short
skinny small tall tiny wide cooing deafening faint harsh hissing hushed
husky loud melodic mute noisy purring quiet raspy screeching shrill
@toke
toke / In case of fire.svg
Created February 23, 2016 12:58 — forked from monkbroc/In case of fire.svg
In case of fire
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@toke
toke / 50-particle.rules
Created February 23, 2016 12:47 — forked from monkbroc/50-particle.rules
Udev rules for Particle devices
# UDEV Rules for Particle boards
#
# This will allow reflashing with DFU-util without using sudo
#
# The latest version of this file may be found at:
# https://gist.github.com/monkbroc/b283bb4da8c10228a61e
#
# This file must be placed at:
#
# /etc/udev/rules.d/50-particle.rules (preferred location)
@toke
toke / langtonsAnt1.pde
Last active April 20, 2016 20:30
Langtons Ant Processing 3.0 Script
/**
* Langton's Ant implementation
* Written for Processing 3.0
* "Do whatever you want with it - except Weapon stuff" - License
* Original Author: Thomas 'toke' Kerpe
**/
// Yes, I do globals
int delay = 110; // Delay between updates