Skip to content

Instantly share code, notes, and snippets.

Karel Vervaeke karel1980

Block or report user

Report or block karel1980

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
import itertools
I_PATTERN = [5,0,7,2,1,4,3,6]
J_PATTERN = [6,3,0,5,2,7,4,1]
def swapi(items):
return swap_with_pattern(items, I_PATTERN)
def swapj(items):
return swap_with_pattern(items, J_PATTERN)
View java
* Copyright 2015 Netflix, Inc.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* Unless required by applicable law or agreed to in writing, software
View gist:34c0c5f221ffc82dc520
Would you be interested in Big Data Users contact information in excel sheet for unlimited marketing usage? We provide Top Decision Makers information like Name, Email, Title, Phone and company details of companies using Big Data.
karel1980 / gist:6594769
Last active Dec 23, 2015
create schema.json based on output from GET /repository/schema/fieldType and GET /repository/schema/recordType
View gist:6594769
import json
# Usage:
# curl -O http://lilyserver:12060/repository/schema/fieldType
# curl -O http://lilyserver:12060/repository/schema/recordType
# python > schema.json
# lily-import schema.json
karel1980 / dilbert_rss_update.rb
Last active Dec 19, 2015
Host your own dilbert feed (image only) 1. slap this gist in a crontab 2. host the feed.xml file It's probably not legal to do this, so don't. I just wanted to make a point.
View dilbert_rss_update.rb
require 'nokogiri'
require 'open-uri'
def get_image_url()
# Find the url for today's dilbert comic on the home page
doc = Nokogiri::HTML(open(""))
doc.css('div.STR_Image img').attr('src')
def update_feed(image_url)
karel1980 / base.pp
Created Jun 5, 2012
All sorts of interesting packages to bootstrap a desktop machine.
View base.pp
class base {
$basepackages = [
"acidrip", "ack-grep", "apparix", "apt-utils", "audacity", "apt-cacher", "apache2", "atop",
"bzr", "bwm-ng",
"chromium-browser", "chromium-codecs-ffmpeg", "clusterssh", "compizconfig-settings-manager", "curl", "calibre", "cheese", "clojure",
"dconf-tools", "desktopcouch-ubuntuone", "devscripts", "dvdrip", "dvdbackup", "dsh", "dos2unix",
"ec2-ami-tools", "ec2-api-tools",
"ffmpeg", "freemind",
"gcompris", "gcompris-sound-nl", "gimp", "git-svn", "gitk", "gnuplot", "groovy", "grpn", "gtk-recordmydesktop", "gddrescue", "gconf-editor", "glade", "graphviz",
View gist:1847209
karel@tomato:~/work/outerthought/whirr$ ruby build-tools/update-versions 12345
Updating to version 12345 ...
build-tools/update-versions:61:in `process_module': undefined method `inner_html=' for nil:NilClass (NoMethodError)
from build-tools/update-versions:54:in `edit_pom'
from build-tools/update-versions:60:in `process_module'
from build-tools/update-versions:73
from build-tools/update-versions:73:in `each'
from build-tools/update-versions:73
from build-tools/update-versions:54:in `edit_pom'
from build-tools/update-versions:67
View gist:1710417
# define 'classes': collections of useful role combinations
# define profiles. these could describe hardware, image, memory, ...
# cluster:
whirr.instance-templates=3 web/heavyweight, 1 db/lightweight, 1 db/heavyweight
You can’t perform that action at this time.