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 / gist:93632d11abb98579fbf8
Created March 10, 2016 08:44
Irssi window bindings 1-40
/bind meta-1 change_window 1
/bind meta-2 change_window 2
/bind meta-4 change_window 4
/bind meta-3 change_window 3
/bind meta-5 change_window 5
/bind meta-6 change_window 6
/bind meta-7 change_window 7
/bind meta-8 change_window 8
/bind meta-9 change_window 9
/bind meta-0 change_window 10
@lepinkainen
lepinkainen / flexget_series_api_performance_test.py
Created February 29, 2016 08:57
Flexget series API performance test
import requests
from datetime import datetime
from dateutil import parser
from dateutil.relativedelta import relativedelta
host = 'localhost'
port = 9090
token = 'LOL'
get_movies_endpoint = '/api/series/?in_config=all&page=1&number_of_shows=100&sort_by=show_name&order=desc'
@lepinkainen
lepinkainen / desktop.boxstarter
Last active January 23, 2016 13:21
Boxstarter script
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions
# Development
cinst -y powershell
cinst -y githubforwindows
cinst -y python3
cinst -y git.commandline
cinst -y sublimetext3
# Media
shrike@lakka:~$ curl asenna.gentoo.fi
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="fi">
<head>
<meta content="text/html; charset=utf-8" http-equiv="content-type" />
<link media="screen" href="screen.css" type="text/css" rel="stylesheet" />
<link media="all" href="content.css" type="text/css" rel="stylesheet" />
<link media="all" href="form.css" type="text/css" rel="stylesheet" />
<title>Kapsi Internet-käyttäjät ry - Lakka</title>
@lepinkainen
lepinkainen / example.yaml
Created November 21, 2013 14:07
Flexget series quality example
tv-series:
series:
settings:
# HD only preferred
hdgroup:
timeframe: 6 hours
target: sdtv+ 720p
# HD ok, not required
normalgroup:
target: sdtv+ <=720p
#!/usr/bin/env python
# link: http://www.emacswiki.org/emacs/PythonMode#toc7
#
# This is a script which runs and parses the output of various Python code
# checking programs to work with flymake. It has lots of issues, one being that
# flymake does not seem to show more than one error message per line of code,
# meaning that an error or warning which is intentionally left unfixed can mask
# an error or warning that would get more attention.
#
# Additionally, the scripts which check python code are either rather anemic,
#/usr/bin/python
# -*- coding: utf-8 -*-
# ascii megaman by HeGeXa
_sini = "\x1b[0m\x1b[44;34m"
_cyan = "\x1b[0m\x1b[46;36m"
_valko = "\x1b[0m\x1b[47;37m"
_kelta = "\x1b[0m\x1b[43;33m"
_musta = "\x1b[0m\x1b[40;30m"
bold = "\x1b[1m"
@lepinkainen
lepinkainen / gist:7096456
Last active December 26, 2015 04:49
Have postfix listen only to loopback interface
# Keep postfix running
service { "postfix":
ensure => 'running',
enable => 'true',
}
# Allow connections from localhost only
augeas { "postfix_localhost_only":
context => "/files/etc/postfix/main.cf/",
changes => [
"set inet_interfaces 127.0.0.1",
@lepinkainen
lepinkainen / config,yml
Created October 20, 2013 19:26
Flexget Nyaa.eu discover setup
nyaa-anime:
discover:
what:
- emit_series: yes
from:
- nyaa: anime
preset: [basic, anime, trakt_tv, notify, limit_ratio]
series:
- Kill la Kill:
from_group: horriblesubs
#!/usr/bin/env python
from __future__ import with_statement
import os
import re
import shutil
import subprocess
import sys
import tempfile