Skip to content

Instantly share code, notes, and snippets.

View arekolek's full-sized avatar

Arek Olek arekolek

  • FARA
View GitHub Profile
abstype and andalso as case do datatype else eqtype end exception fn fun functor handle if in include infix infixr let local nonfix of op open orelse raise rec sharing sig signature struct structure then type val with withtype while
use
:: nil null length hd tl rev concat revAppend app map foldl foldr
size substring concat str implode explode
Array.maxLen Array.array Array.fromList Array.tabulate Array.length Array.sub Array.update Array.vector Array.copy Array.copyVec Array.appi Array.app Array.modifyi Array.modify Array.foldli Array.foldri Array.foldl Array.foldr Array.findi Array.find Array.exists Array.all Array.collate
@arekolek
arekolek / Duolingo_weak_words_counter.user.js
Created April 14, 2015 19:10
Control the number of weak words in your vocabulary on Duolingo by displaying a counter at the top of the page.
// DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
// Version 2, December 2004
//
//Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
//
//Everyone is permitted to copy and distribute verbatim or modified
//copies of this license document, and changing it is allowed as long
//as the name is changed.
//
// DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@arekolek
arekolek / coachella.sh
Created April 14, 2012 17:13
Download Coachella 2012 YouTube live stream
#!/bin/bash
usage()
{
cat << EOF
Usage: $0 [OPTIONS] STREAM_NUMBER
Downloads Coachella YouTube live stream number STREAM_NUMBER (required, one of 1, 2 or 3).
Stop the download simply with CTRL-C.
Any options after STREAM_NUMBER will be ignored.
@arekolek
arekolek / known.user.js
Created April 15, 2012 17:50
Strike through known artists
// i'm just savin' this for later
function magic(json){
var a = {}
for(var i in json["topartists"]["artist"]){
a[json["topartists"]["artist"][i]["name"]]=true;
}
var tds = document.getElementsByClassName("subjectCell");
@arekolek
arekolek / gist:2759932
Created May 20, 2012 23:40
Make category entries link to last.fm artist pages
links = document.getElementById("mw-pages").getElementsByTagName("a"); for(var i in links){try{links[i].href = "http://last.fm/music/" + links[i].title.replace(' ','+');}catch(e){}}
@arekolek
arekolek / copydrawables.sh
Created November 22, 2012 16:07
Copy Android drawables to your project
##
# DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
# Version 2, December 2004
#
# Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
#
# Everyone is permitted to copy and distribute verbatim or modified
# copies of this license document, and changing it is allowed as long
# as the name is changed.
#
@arekolek
arekolek / duolingo_lingot_philanthropy.user.js
Last active December 3, 2015 14:02
Archived, doesn't work anymore. A userscript for Duolingo that lets give out many lingots at once
// ==UserScript==
// @name Duolingo Lingot Philanthropy
// @namespace http://github.com/arekolek
// @include https://www.duolingo.com/*
// @version 1.0
// @grant none
// ==/UserScript==
function setIntervalLimited(fn, n, t) {
if(n <= 0) return;
@arekolek
arekolek / adjacency.R
Last active April 29, 2016 11:30
Benchmark BGL functions on list and matrix graph representations
library(plyr)
file = paste(commandArgs(TRUE)[1], '.txt', sep='')
d = read.table(file, col.names=c('n', 'vertices', 'edges', 'edge', 'out_degree', 'adjacent_vertices', 'add_edge', 'remove_edge', 'source', 'target'))
d = ddply(d, ~n, colwise(mean))
d[,c(3:6,8)] = d[,c(3:6,8)]/1000
// ==UserScript==
// @name No mousewheel-zoom
// @namespace http://github.com/arekolek
// @version 0.1
// @author Arek Olek
// @match http://*/*
// @match https://*/*
// @grant none
// ==/UserScript==
@arekolek
arekolek / .gitconfig
Created February 3, 2017 11:06
Helpful aliases for Git
[alias]
st = status
aliases = config --get-regexp ^alias\\.
precommit = diff --cached --minimal -w
amend = commit --amend
discard = checkout --
unstage = reset HEAD --
stashes = stash list
save = commit -m
graph = log --graph --branches --remotes --tags --format=format:'%Cgreen%h %Creset• %<(75,trunc)%s (%cN, %cr) %Cred%d' --date-order