Skip to content

Instantly share code, notes, and snippets.


Jaakko Pallari jkpl

View GitHub Profile
jkpl /
Created Oct 22, 2011
Script that downloads Youtube playlist and extracts the audio from the downloaded clips.
## URL
# The URL to the Youtube playlist
# The path where to to download the music to
jkpl /
Last active Oct 9, 2015
Credential getter for CFG formatted password files.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
from ConfigParser import ConfigParser
from subprocess import Popen, PIPE, STDOUT
# Place your own settings here
filepath = (os.environ['HOME'], '.mypwfile.gpg')
jkpl / eap-ttls-pap
Created Feb 1, 2013
Wicd template for Eduroam networks (this should work on Univesity of Jyväskylä's jyu-student and jyu-staff networks).
View eap-ttls-pap
author = jkpl
version = 1
require identity *Identity password *Password
optional ca_cert *Path_to_CA_cert anon_identity *Anonymous_Identity
protected password *Password
jkpl / fasttrack.clj
Last active Feb 25, 2017
Reaktor Fast Track in Clojure
View fasttrack.clj
(ns jkpl.fasttrack
(:require [clojure.string :as s]
[ :as io]))
(defn string-to-numbers
"Converts string of numbers to a list of numbers"
(->> (s/split s #" ")
(map read-string)))
jkpl / freefrp.js
Last active May 7, 2020
Free monad based thread simulation and FRP constructs written in JavaScript.
View freefrp.js
// Free monad based thread simulation and FRP constructs written in JavaScript
// First, we need some way to express lazy values and actions.
// We can use zero-argument functions for this purpose: call the function and
// you get the value. We also need to compose lazy values/actions. For that
// we have bindLazy function. Lazy values are not expected to be pure
// in this program: evaluating a lazy value/action at different times can produce
// a different value.
jkpl /
Created May 12, 2015
Macros for Poole
import os
import json
import iso8601
from datetime import datetime
from lesscss import LessCSS
# Defaults
page = {}
pages = []
jkpl /
Created May 30, 2015
Spotify lookup in command line
import urllib
import sys
import json
import re
SP_REGEX = re.compile('^http://[\S]+/track/([\S]+)')
jkpl /
Created May 30, 2015
Spotify app controls in command line
SPOTIFYCMD="dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player."
function spotify_oper {
case $1 in
jkpl /
Last active Apr 1, 2019

Keybase proof

I hereby claim:

  • I am jkpl on github.
  • I am jkpl ( on keybase.
  • I have a public key ASA3n-ICY3CrHvBEUoW3UG4vA3md_9RKyDFL3AT30KJAswo

To claim this, I am signing this object:

jkpl / box.js
Created Jul 28, 2015
Promise based queue
View box.js
function mkBox() {
var box = {values: [], reads: []};
box.enq = function(value) {
if (box.reads.length > 0) {
return box;