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 / dropbox.sh
Last active August 29, 2015 13:56
Start dropbox in a shell if it's not running
# 1) install dropbox in a shell using the instructions provided here
# https://www.dropbox.com/install?os=linux
# 2) install the cli script as ~/bin/dropbox
# https://www.dropbox.com/download?dl=packages/dropbox.py
# 3) add the following to your .bash_profile
# start dropbox on login if it's not running
if [ -f ~/bin/dropbox ]; then
~/bin/dropbox running
if [ $? -ne 0 ]; then

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:

# screen compatibility stuff
set-option -g prefix C-a
unbind-key C-b
bind-key a send-prefix
bind-key C-a last-window
bind-key C-d detach-client
bind-key BSpace previous-window
# colors
# http://ytaniike.posterous.com/256-colors-with-tmuxs-colour-numbers
@lepinkainen
lepinkainen / hilma2rss.py
Created October 22, 2014 12:07
Hilma to RSS feed
from bs4 import BeautifulSoup
import urllib3
import json
from datetime import datetime
import PyRSS2Gen
url = "http://www.hankintailmoitukset.fi/fi/notice/search/?_s%5B_sent%5D=1&_s%5Bphrase%5D=&_s%5Bcpv%5D=72-5&_s%5Borganisation%5D=&_s%5Bnuts%5D=&_s%5Bpublished_start%5D=&_s%5Bpublished_end%5D=&_s%5Bform_number%5D%5B%5D=domestic_contract&_s%5Bform_number%5D%5B%5D=contract&_s%5Bform_number%5D%5B%5D=contract_utilities"
http = urllib3.PoolManager()
@lepinkainen
lepinkainen / unrar.py
Created January 14, 2015 10:07
Unrar standard scene releases using 7zip
#!/usr/bin/python
import logging
import os
from glob import glob
import subprocess
logging.basicConfig(level=logging.DEBUG)
def unrar(directory, outdir='.'):
@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
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser -Force
Add-Type @"
using System;
using System.Runtime.InteropServices;
using Microsoft.Win32;
namespace Wallpaper
{
public enum Style : int
{
@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 / 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 / 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