IR codes came from here
code was adapted from here
run:
python3 ir_codes.py ./samsung_tv_codes.csv
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: pi_shutdown | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: S | |
# Default-Stop: | |
# Short-Description: Shutdown on GPIO trigger | |
# Description: Python script listens for GPIO and runs shutdown command | |
### END INIT INFO |
#!/usr/bin/python | |
import RPi.GPIO as GPIO | |
import time | |
import subprocess | |
GPIO.setmode(GPIO.BOARD) | |
# we will use the pin numbering to match the pins on the Pi, instead of the | |
# GPIO pin outs (makes it easier to keep track of things) | |
# use the same pin that is used for the reset button (one button to rule them all!) |
/** | |
* door lock application (c) 2011 Florian Klien | |
* some code parts are borrowed from different authors ;) thx | |
*/ | |
#include <NewSoftSerial.h> | |
#define rxPin 2 | |
#define txPin 3 |
# my working salt postgres config (updated since first post on IRC #salt) | |
postgres_server: | |
pkg: | |
- installed | |
- pkgs: | |
- postgresql | |
service: | |
- running | |
- name: postgresql | |
- enable: True |
/* | |
This is an Overpass query. | |
It queries all phone booths in Austria. | |
*/ | |
area | |
[admin_level=2] | |
["boundary"="administrative"] | |
["name"="Österreich"]->.a; | |
node | |
(area.a) |
-- Prosody XMPP Server Configuration | |
-- | |
-- Information on configuring Prosody can be found on our | |
-- website at http://prosody.im/doc/configure | |
-- | |
-- Tip: You can check that the syntax of this file is correct | |
-- when you have finished by running: luac -p prosody.cfg.lua | |
-- If there are any errors, it will let you know what and where | |
-- they are, otherwise it will keep quiet. | |
-- |
#!/bin/bash | |
# get a country statistic for Fail2Ban blocks: | |
# this just accounts for IPs once. Multiple failed attempts by one IP just show up once for a country. | |
for i in `sudo cat /var/log/fail2ban.log | sed 's/.*[Bb]an \(.*\)/\1/' | sort | uniq | cut -d ' ' -f 1 | grep "\."`; | |
do | |
echo $i; whois $i | grep country\: |head -n 1 >> fail2ban_ctry.log ; | |
done | |
cat fail2ban_ctry.log | sed 's/country: //g' |sort | uniq -c | sort -nr |