Skip to content

Instantly share code, notes, and snippets.

View robdaemon's full-sized avatar

Robert Roland robdaemon

View GitHub Profile
@robdaemon
robdaemon / updated-ui.yml
Created July 1, 2016 19:44
Updated Kubernetes UI definition that creates a load balancer
# Copyright 2015 Google Inc. All Rights Reserved.
#
# 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
@robdaemon
robdaemon / init.el
Created December 10, 2015 05:20
Fix the path on emacs on Mac
;; fix the PATH variable
(defun set-exec-path-from-shell-PATH ()
(let ((path-from-shell (shell-command-to-string "$SHELL -i -c 'echo -n $PATH'")))
(setenv "PATH" path-from-shell)
(setq exec-path (split-string path-from-shell path-separator))))
(defun set-env-from-shell (envvar)
(let ((path-from-shell (shell-command-to-string (format "$SHELL -i -c 'echo -n $%s'" envvar))))
(setenv envvar path-from-shell)))
db.StartTransaction
err := db.Execute
if err != nil {
db.Rollback
return
}
err := db.Execute
if err != nil {
@robdaemon
robdaemon / gist:7132765ca20586f92b2e
Created September 24, 2014 04:19
Strangeloop talks
Our shared joy of programming: https://www.youtube.com/watch?v=3_zW63dcZB0
The mess we're in: https://www.youtube.com/watch?v=lKXe3HUG2l4
Programming should eat itself: https://www.youtube.com/watch?v=SrKj4hYic5A
Inside the Wolfram Language: https://www.youtube.com/watch?v=EjCWdsrVcBM
Transducers: https://www.youtube.com/watch?v=6mTbuzafcII
@robdaemon
robdaemon / asciidoctor-diagram
Last active August 29, 2015 14:05
mixing asciidoctor-diagram and images into a single document
asciidoctor-diagram allows you to mix a diagram into your doc, but GitHub doesn't render it inline. Instead, you can do this:
----
ifdef::env-github[]
image::diagram.png[]
endif::[]
ifndef::env-github[]
["plantuml", "diagram", "png"]
-----------------------------------------------
title My Diagram
@robdaemon
robdaemon / 50-synaptics.conf
Created June 12, 2014 23:50
My Synaptics config for a ThinkPad W540 on Xubuntu 14.04. This goes into /etc/X11/xorg.conf.d - you should create the folder if it doesn't exist.
Section "InputClass"
Identifier "nathan touchpad catchall"
MatchIsTouchpad "on"
MatchDevicePath "/dev/input/event*"
Driver "synaptics"
# three fingers for the middle button
Option "TapButton3" "2"
# drag lock
Option "LockedDrags" "1"

Keybase proof

I hereby claim:

  • I am robdaemon on github.
  • I am robdaemon (https://keybase.io/robdaemon) on keybase.
  • I have a public key whose fingerprint is CCA2 8FEA 219F 24CD 23C2 8249 5E92 B664 427E 1A4B

To claim this, I am signing this object:

@robdaemon
robdaemon / gist:7541259
Created November 19, 2013 06:46
default GC settings
-XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:CMSInitiatingOccupancyFraction=70 -XX:+UseCMSInitiatingOccupancyOnly -XX:+CMSParallelRemarkEnabled
@robdaemon
robdaemon / gist:7363889
Created November 7, 2013 23:48
protoc compile in 10.9
google/protobuf/message.cc:130:60: error: implicit instantiation of undefined template 'std::__1::basic_istream<char, std::__1::char_traits<char> >'
return ParseFromZeroCopyStream(&zero_copy_input) && input->eof();
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/iosfwd:108:28: note: template is declared here
class _LIBCPP_TYPE_VIS basic_istream;
^
google/protobuf/message.cc:135:67: error: implicit instantiation of undefined template 'std::__1::basic_istream<char, std::__1::char_traits<char> >'
return ParsePartialFromZeroCopyStream(&zero_copy_input) && input->eof();
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/iosfwd:108:28: note: template is declared here
@robdaemon
robdaemon / built.sbt
Last active December 22, 2015 16:29
build.sbt that allows you to compile with the jersey-client 2.2 jar
name := "prefect"
version := "1.0"
scalaVersion := "2.10.2"
libraryDependencies ++= Seq(
"org.glassfish.jersey.core" % "jersey-client" % "2.2" excludeAll(
ExclusionRule(organization = "org.glassfish.hk2")
),