Skip to content

Instantly share code, notes, and snippets.

View rkoch's full-sized avatar

Remo Koch rkoch

  • Switzerland
View GitHub Profile
@rkoch
rkoch / _setup.sh
Created October 7, 2018 15:41
Hammerspoon Auto Reload Config
#!/usr/bin/env bash
log () {
echo "LOG[hammerspoon]: $1"
}
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
DEFAULTS=/usr/bin/defaults
BUDDY=/usr/libexec/PlistBuddy
@rkoch
rkoch / keybase.md
Created February 26, 2017 02:53
Keybase Proof

Keybase proof

I hereby claim:

  • I am rkoch on github.
  • I am rko (https://keybase.io/rko) on keybase.
  • I have a public key ASCv_1yFDsVoFUDyYFomntHhgVBb8e-8V8QlAc3drAlf3wo

To claim this, I am signing this object:

#error {
:cause bee.http_client.component.HttpClient
:via
[{:type clojure.lang.Compiler$CompilerException
:message java.lang.ClassNotFoundException: bee.http_client.component.HttpClient, compiling:(bee/http_client/service.clj:37:1)
:at [clojure.lang.Compiler load Compiler.java 7239]}
{:type java.lang.ClassNotFoundException
:message bee.http_client.component.HttpClient
:at [java.net.URLClassLoader findClass URLClassLoader.java 381]}]
:trace
@rkoch
rkoch / brownbag-presentation.md
Last active August 29, 2015 14:17
Brownbag Presentation 26.03.2015
@rkoch
rkoch / 0_reuse_code.js
Last active August 29, 2015 14:16
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@rkoch
rkoch / gist:899864b2d0970721307a
Created February 18, 2015 17:02
count angular watchers snippet for chrome
function countWatchers (root) {
root = angular.element(root || document.documentElement);
var scopes = {};
function traverseElement (element) {
var count = 0;
var data = element.data();
count += countWatchersFromScope(data.$isolateScope);
count += countWatchersFromScope(data.$scope);
angular.forEach(element.children(), function (childElement) {
@rkoch
rkoch / exec-problem.cpp
Last active December 24, 2015 21:39
exec() Problem in Eclipse debugging mode
#include <iostream>
#include <sys/types.h>
#include <unistd.h>
#include <sys/wait.h>
int main(int pArgc, const char* pArgv[]) {
pid_t pid = fork(); // vfork() would also be an option
if (pid < 0) {
std::cerr << "Error creating child process" << std::endl;
@rkoch
rkoch / appify
Created November 13, 2012 20:49 — forked from mathiasbynens/appify
appify — create the simplest possible Mac app from a shell script
#!/bin/bash
if [ "$1" = "-h" -o "$1" = "--help" -o -z "$1" ]; then cat <<EOF
appify v3.0.1 for Mac OS X - http://mths.be/appify
Creates the simplest possible Mac app from a shell script.
Appify takes a shell script as its first argument:
`basename "$0"` my-script.sh