Skip to content

Instantly share code, notes, and snippets.

@erikthered
erikthered / csvmerge.go
Last active March 18, 2020 00:21
CSV merge for coding test
package main
import (
"encoding/csv"
"fmt"
"io"
"log"
"os"
"strconv"
)
@erikthered
erikthered / build.gradle
Created April 10, 2017 14:20
Kotlin JRE8 build.gradle skeleton
group 'io.github.erikthered'
version '1.0-SNAPSHOT'
buildscript {
ext.kotlin_version = '1.1.1'
repositories {
mavenCentral()
}
dependencies {

Keybase proof

I hereby claim:

  • I am erikthered on github.
  • I am erikdnelson (https://keybase.io/erikdnelson) on keybase.
  • I have a public key ASB6hwvdPohK2H3o-ZwLLJugwy27AegI82OYxUbOhPL5JQo

To claim this, I am signing this object:

@erikthered
erikthered / htpc-instructions.md
Last active December 22, 2018 00:07
Ubuntu 15.04 + Kodi + Steam

Install Lubuntu 15.04

Install openssh-server

Install pulseaudio

sudo apt-get install pulseaudio pavucontrol libasound2-plugins

Install nvidia drivers

(Optional) Disable EDID DPI and set manually

@erikthered
erikthered / gist:1237ce6856c656cd871f
Last active August 29, 2015 14:21
Wake/suspend with remote from Kodibuntu 14.04.1
lsusb
sudo nano /etc/udev/rules.d/90-mcewakeup.rules
SUBSYSTEM=="usb", ATTRS{idVendor}=="1784", ATTRS{idProduct}=="0008" RUN+="/bin/sh -c 'echo enabled > /sys$env{DEVPATH}/../power/wakeup'"
sudo nano /etc/polkit-1/localauthority/50-local.d/custom-actions.pkla (I think this is the one that matters)
[Actions for erik user]
Identity=unix-user:erik
eclipse {
classpath.file {
whenMerged { classpath ->
classpath.entries.removeAll { it.path.endsWith('pom') }
}
}
wtp.component.file {
whenMerged { wtpComponent ->
def toIgnore = wtpComponent.wbModuleEntries.findAll { entry ->
@erikthered
erikthered / d3start.html
Last active June 25, 2019 12:48
Starting point for d3 js. Trying to make a burndown chart.
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>Burndown Chart</title>
<style>
.chart {
border: 1px solid black;
}
.chart div {
@erikthered
erikthered / gist:3657407
Created September 6, 2012 15:30
I suck at node :(
function findUser(login, callback){
var collection = db.collection("users");
return collection.findOne({"login":login}, function(err, doc){
callback(null, doc);
});
}
// Try to find user based on login param
findUser(req.params.login, function(err,user){
var message = "Default message";
@erikthered
erikthered / gist:3500628
Created August 28, 2012 16:58
Hubot Upstart script with logging
# hubot
description "Hubot chat bot"
start on filesystem or runlevel [2345]
stop on runlevel [!2345]
# Path to Hubot installation
env HUBOT_DIR='/opt/hubot/'
env HUBOT='bin/hubot'