Skip to content

Instantly share code, notes, and snippets.

View lepinkainen's full-sized avatar
💭
Hmm?

Riku Lindblad lepinkainen

💭
Hmm?
View GitHub Profile
@lepinkainen
lepinkainen / while_waiting.py
Created February 11, 2014 17:18
npyscreen while_waiting minimal example - doesn't work
import npyscreen
from datetime import datetime
class DateForm(npyscreen.Form):
def while_waiting(self):
npyscreen.notify_wait("Update")
self.display()
def create(self):
self.add(npyscreen.FixedText, value=datetime.now(), editable=False)
@lepinkainen
lepinkainen / traefik-docker-compose.yml
Last active February 19, 2021 07:19
Traefik setup
# Traefik compose file
services:
reverse-proxy:
# The official v2.1 Traefik docker image
image: traefik:v2.2.1
container_name: traefik
# Enables the web UI and tells Traefik to listen to docker
command:
- --log.level=INFO
@lepinkainen
lepinkainen / rtorrent.rc
Created April 25, 2010 22:37 — forked from ion1/rtorrent.rc
rtorrent finished events
# http://libtorrent.rakshasa.no/wiki/RTorrentRatioHandling
# Ratio 2.0, close & erase when done - erasing deletes torrents from rtorrent
ratio.enable =
ratio.min.set = 200
ratio.max.set = 0
ratio.upload.set = 0
system.method.set = group.seeding.ratio.command, d.close=, d.erase=
# On completion, move the torrent to the directory from custom1.
@lepinkainen
lepinkainen / tag_to_mqtt.py
Last active June 8, 2020 06:19
Ruuvitag to MQTT as JSON
# Installation
# sudo apt-get install libglib2.0-dev
# sudo pip install git+https://github.com/kipe/ruuvitag.git
# sudo pip install paho-mqtt
#
# Run with: sudo python3 tag_to_mqtt.py
#
# Run this script in a while loop or from cron
from ruuvitag import RuuviTag
@lepinkainen
lepinkainen / Caddyfile
Last active February 19, 2020 22:41
Traefik + Caddy + ACME + services + fancy subdomains
0.0.0.0:80 {
tls off
status 404 /
}

Sotakarjujen houserulet

Errata

Ryhmänjohtaja

  • Ryhmänjohtaja saa kierroksen alussa ilmaisen komentoactionin koko ryhmälle
  • Kolme komentoa: a) “hyökkää X:ää vastaan” b) “parempaan ilmasuojaan”

Keybase proof

I hereby claim:

  • I am lepinkainen on github.
  • I am shrike (https://keybase.io/shrike) on keybase.
  • I have a public key ASCUYSPOHC7kW_eWi6QDcKZQs6j0s64G6Tvt6FMxzDMIJwo

To claim this, I am signing this object:

@lepinkainen
lepinkainen / gist:5df60f22aa322b29e4292ca15b84275a
Created July 24, 2019 19:31
Harmonized Commodity Description and Coding System, 2002
This file has been truncated, but you can view the full file.
"Order","Level","Code","Parent","Code","Parent","Description","Self-explanatory texts"
"152692","1","010010000090",,"I",,"SECTION I - LIVE ANIMALS; ANIMAL PRODUCTS",
"152693","2","010020000090","010010000090","01","I","CHAPTER 1 - LIVE ANIMALS","LIVE ANIMALS"
"152694","3","010100000080","010020000090","0101","01","Live horses, asses, mules and hinnies","Live horses, asses, mules and hinnies"
"152695","4","010110000080","010100000080","0101 10","0101"," - Pure-bred breeding animals","Pure-bred breeding horses and asses"
"152696","4","010190000080","010100000080","0101 90","0101"," - Other","Live horses, asses, mules and hinnies (excl. pure-bred for breeding)"
"152697","3","010200000080","010020000090","0102","01","Live bovine animals","Live bovine animals"
"152698","4","010210000080","010200000080","0102 10","0102"," - Pure-bred breeding animals","Pure-bred breeding bovines"
"152699","4","010290000080","010200000080","0102 90","0102"," - Other","Live bovine animals (excl. pure-bred for breeding)"
"152700","3",
@lepinkainen
lepinkainen / main.go
Created January 8, 2018 07:13 — forked from enricofoltran/main.go
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
package main
import (
"context"
"flag"
"fmt"
"log"
"net/http"
"os"
"os/signal"
@lepinkainen
lepinkainen / common.yml
Created April 21, 2016 12:29
Ansible playbook for dev desktop
- name: Check timezone
command: cat /etc/timezone
changed_when: no
register: current_timezone
- name: Change timezone
become: yes
copy: content='{{ timezone }}'
dest=/etc/timezone
owner=root