Skip to content

Instantly share code, notes, and snippets.

View haarts's full-sized avatar

Harm Aarts haarts

View GitHub Profile
@haarts
haarts / example.go
Created November 16, 2012 15:01
Read a Photo with libccv
package main
/*
#include "ccv.h"
*/
import "C"
import (
"fmt"
"unsafe"
@haarts
haarts / crashplan.yaml
Created November 25, 2012 00:59
crashplan for Pi
---
- hosts: pi
user: pi
sudo: yes
tasks:
- name: install java
action: apt pkg=openjdk-6-jre state=installed
- name: install JNA
action: apt pkg=libjna-java state=installed
- name: move patched lib
@haarts
haarts / dae_cifar.yaml
Created July 11, 2013 11:57
Denoising autoencoder with CIFAR10. Overfitting like there is no tomorrow.
!obj:pylearn2.train.Train {
"dataset": !obj:pylearn2.datasets.cifar10.CIFAR10 &dataset {
"which_set" : 'train'
},
"model": !obj:pylearn2.models.autoencoder.DenoisingAutoencoder {
"nvis" : 3072,
"nhid" : 400,
"irange" : 0.05,
"corruptor": !obj:pylearn2.corruption.BinomialCorruptor {
"corruption_level": 0.5,
<html>
<body>
<ul id="list">
<ul/>
<script type="text/javascript">
var list = document.querySelector("#list");
function createListItem(show) {
var link = document.createElement("a");
@haarts
haarts / tor.conf
Created August 31, 2012 20:13
RaspberryPi Tor monit configuration (bonus: vnstat monit configuration)
# Tor is leaking memory. Restart when necessary.
check process tor with pidfile /var/run/tor/tor.pid
start program = "/usr/sbin/tor -f /etc/tor/torrc"
stop program = "/bin/sh -c '/bin/kill -s SIGTERM `cat /var/run/tor/tor.pid` && rm /var/run/tor/tor.pid'"
if mem > 64 MB for 3 cycles then restart
function verify_container_running --argument-names container
set container_status (curl -s -k --cert ~/.config/lxc/client.crt --key ~/.config/lxc/client.key https://localhost:8443/1.0/containers/$container | jq '.metadata.status')
if [ $container_status != "\"Running\"" ]
lxc start $container
end
end
@haarts
haarts / collections.dat
Created February 3, 2017 12:07
Which Java Collection is used most often?
ArrayList 20870423
Stack 13799424
HashSet 3862284
Vector 3855212
LinkedList 2543036
TreeSet 589965
LinkedHashSet 366171
EnumSet 289934
LinkedBlockingQueue 207736
PriorityQueue 136294
root = true
# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
# 2 space indentation
[*.dart]
indent_style = space
indent_size = 2
colorscheme zenburn
add-highlighter global/ number-lines -relative
add-highlighter global/ show-matching
hook global WinSetOption filetype=python %{
hook window InsertChar \t -group python-indent %{ exec -draft h@ }
}
hook global WinSetOption filetype=git-commit %{
autowrap-enable
@haarts
haarts / symbols.txt
Created January 3, 2019 20:40
log generated with `export LD_DEBUG=symbols`
2415: symbol=_ZNSbIwSt11char_traitsIwESaIwEE4_Rep11_S_max_sizeE; lookup in file=libffmpeg.so [0]
2415: symbol=_ZNSbIwSt11char_traitsIwESaIwEE4_Rep11_S_max_sizeE; lookup in file=/usr/lib/x86_64-linux-gnu/libasound.so.2 [0]
2415: symbol=_ZNSbIwSt11char_traitsIwESaIwEE4_Rep11_S_max_sizeE; lookup in file=/usr/lib/x86_64-linux-gnu/libcups.so.2 [0]
2415: symbol=_ZNSbIwSt11char_traitsIwESaIwEE4_Rep11_S_max_sizeE; lookup in file=/lib/x86_64-linux-gnu/librt.so.1 [0]
2415: symbol=_ZNSbIwSt11char_traitsIwESaIwEE4_Rep11_S_max_sizeE; lookup in file=/lib/x86_64-linux-gnu/libdl.so.2 [0]
2415: symbol=_ZNSbIwSt11char_traitsIwESaIwEE4_Rep11_S_max_sizeE; lookup in file=/lib/x86_64-linux-gnu/libexpat.so.1 [0]
2415: symbol=_ZNSbIwSt11char_traitsIwESaIwEE4_Rep11_S_max_sizeE; lookup in file=/usr/lib/x86_64-linux-gnu/libstdc++.so.6 [0]
2415: symbol=_ZN12v8_inspector8protocol8Debugger3API6Paused10ReasonEnum3XHRE; lookup in file=libnode.so [0]
2415: symbol=_ZN12v8_inspector