Skip to content

Instantly share code, notes, and snippets.

@kbl
kbl / new-jdk-update-alternatives.sh
Created September 20, 2019 08:12
Script that I'm using whenever I'm installing new JDK manually.
#!/bin/bash
JAVA_VERSION=13
JAVA_DIR=/usr/lib/jvm/jdk-${JAVA_VERSION}
PRIORITY=11${JAVA_VERSION}
declare -A ALTERNATIVES_TO_UPDATE
ALTERNATIVES_TO_UPDATE=(
[jaotc]=bin
[jar]=bin
@kbl
kbl / matek.go
Created January 27, 2018 15:00
Mathandel script
package main
import (
"fmt"
"net/http"
"log"
"io/ioutil"
"strings"
"encoding/xml"
"strconv"
@kbl
kbl / import.py
Last active September 24, 2023 21:10
importing tasks/lists from wunderlist into todoist
# -*- coding: utf8 -*-
import json
import urllib2
import urllib
import sys
import os
from argparse import ArgumentParser
from collections import defaultdict
#!/bin/bash
function usage() {
echo "Usage: $0 <playlist-id>"
exit 1
}
function download() {
local tempfile=`tempfile` || usage
local formated_tempfile=`tempfile` || usage
curl -s "https://gdata.youtube.com/feeds/api/playlists/$1?max-results=$2&start-index=$3" > $tempfile
xmllint --format $tempfile > $formated_tempfile