Skip to content

Instantly share code, notes, and snippets.

Florian Klien flowolf

Block or report user

Report or block flowolf

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@lizthegrey
lizthegrey / attributes.rb
Last active Oct 11, 2019
Hardening SSH with 2fa
View attributes.rb
default['sshd']['sshd_config']['AuthenticationMethods'] = 'publickey,keyboard-interactive:pam'
default['sshd']['sshd_config']['ChallengeResponseAuthentication'] = 'yes'
default['sshd']['sshd_config']['PasswordAuthentication'] = 'no'
@totti2
totti2 / SSRPARI_Snapserver_Snapclient_RPi3.md
Last active Sep 15, 2019
Synchronous multi-room sound casting of Bluetooth, Airplay, Line-In and Spotitfy
View SSRPARI_Snapserver_Snapclient_RPi3.md

Synchronous multi-room sound casting of Bluetooth, Airplay, Line-In and Spotitfy

ALL CREDITS TO @badaix AND @BaReinhard

This will setup a raspberry-pi-3 as a snapcast-server and snapcast-client.
Possible music sources for the snapserver-component: Bluetooth, Airplay, Spotify, Line-In (more to come eg. RTP)
Music sinks (snapclients): usb soundcard connected to my stereo, another Pi

To Do:

  • Energy saving by disabling onboard bluetooth, wifi and soundcard
View cec-detection.md

CEC-Detection

Want to control a TV over HDMI-CEC via a remote RasPi? Include the following as a switch:

platform: command_line
switches:
    tv_power:
      command_on: "ssh pi@<ip_address> -i /home/homeassistant/.homeassistant/id_homeassistant 'echo on 0 | cec-client -s -d 1'"
      command_off: "ssh pi@<ip_address> -i /home/homeassistant/.homeassistant/id_homeassistant 'echo standby 0 | cec-client -s -d 1'"
@marcan
marcan / linux.sh
Last active May 22, 2019
Linux kernel initialization, translated to bash
View linux.sh
#!/boot/bzImage
# Linux kernel userspace initialization code, translated to bash
# (Minus floppy disk handling, because seriously, it's 2017.)
# Not 100% accurate, but gives you a good idea of how kernel init works
# GPLv2, Copyright 2017 Hector Martin <marcan@marcan.st>
# Based on Linux 4.10-rc2.
# Note: pretend chroot is a builtin and affects the current process
# Note: kernel actually uses major/minor device numbers instead of device name
anonymous
anonymous / overpass.geojson
Created Jan 20, 2016
data exported by overpass turbo
View overpass.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@stefan2904
stefan2904 / backupSessionstore.sh
Created Jul 30, 2014
quick & dirty script to backup Firefox's sessionstore (contains open tabs, etc). run @daily via cron for maximum comfort.
View backupSessionstore.sh
#!/bin/sh
SESSIONSTORE="<path to Firefox profile dir>/<profile>.default/sessionstore.js"
TARGET="<some secure/synced location>/sessionstore"
# TODO: add other files here (bookmarks?)
FORMAT=`date +%Y-%m-%d`
cp "${SESSIONSTORE}" "${TARGET}/${FORMAT}_sessionstore.js"
@takeshixx
takeshixx / hb-test.py
Last active Sep 26, 2019
OpenSSL heartbeat PoC with STARTTLS support.
View hb-test.py
#!/usr/bin/env python2
"""
Author: takeshix <takeshix@adversec.com>
PoC code for CVE-2014-0160. Original PoC by Jared Stafford (jspenguin@jspenguin.org).
Supportes all versions of TLS and has STARTTLS support for SMTP,POP3,IMAP,FTP and XMPP.
"""
import sys,struct,socket
from argparse import ArgumentParser
anonymous
anonymous / btc_hue.markdown
Created Dec 2, 2013
BTC Philip's Hue Over/Under Colors
View btc_hue.markdown

#BTC Ticker Light This script updates one of your Philip's Hue lights to be either red or green depending on if the current price of bitcoin is below or above the 24 hour weighted price.

The light

##Install Dependencies
easy_install install beautifulhue

##The Script
Save this to a python file after customizing your Philip's Hue Bridge ip, username, and light_id.

@johntyree
johntyree / getBlockLists.sh
Last active Oct 10, 2019
Make one large blocklist from the bluetack lists on iblocklist.com
View getBlockLists.sh
#!/usr/bin/env sh
# Download lists, unpack and filter, write to stdout
curl -s https://www.iblocklist.com/lists.php \
| sed -n "s/.*value='\(http:.*=bt_.*\)'.*/\1/p" \
| xargs wget -O - \
| gunzip \
| egrep -v '^#'
You can’t perform that action at this time.