Skip to content

Instantly share code, notes, and snippets.


Robbie Vanbrabant robbiev

View GitHub Profile
View union.c
#include <stdio.h>
struct vec4_a {
union { float x, r; } a;
union { float y, g; } b;
union { float z, b; } c;
union { float w, a; } d;
union vec4_b {

Keybase proof

I hereby claim:

  • I am robbiev on github.
  • I am robbiev ( on keybase.
  • I have a public key ASDB0xogAyXD74C-obC6GYD-p2Scye0aOKOXUhbG88JQQAo

To claim this, I am signing this object:

robbiev /
Created Apr 17, 2017
tmux shortcuts

Use C-b ' to select a multi-digit window index

robbiev /
Created Apr 14, 2017
clipboard access for WSL / bash on Windows

For those who want to go the X server route, let me leave my notes here.

  1. Install VcXsrv (I found that Xming is outdated on sourceforge and the new version is donationware)
  2. If it starts after installing, stop it
  3. Start it using XLaunch (search in the start menu), go with all the defaults (ensure the clipboard options are checked)
  4. At the end, save the configuration to a file (use that to start it from now on)
  5. Put export DISPLAY=localhost:0.0 in your .bashrc in bash for Windows (and run the command in any open bash windows). The reason I explicitly say localhost is that this makes SSH X forwarding work, see below.
  6. Ensure vim is installed using clipboard support. vim --version | grep clipboard should say +clipboard, not -clipboard. Also if you run the ex command :echo has('clipboard') in vim and it says 0 it does not have clipboard support compiled in. If you don't have clipboard support, install the vim-gtk package (`apt-get install vi
robbiev /
Last active Mar 9, 2020
vim keybindings for the Go Playground at

Wasavi is some sort of vim implementation for browser text fields.

Once installed go to, you can use INSERT or CTRL+ENTER to enter the vim mode. To quit use the usual vim commands.


  • The default keybinding to enter vim mode, CTRL+ENTER, conflicts with the standard playground shortcuts (CTRL+ENTER to format, SHIFT+ENTER to run). I recommend configuring wasavi to not enter vim mode on CTRL+ENTER (just use INSERT or configure something else)
  • Once you remapped CTRL+ENTER, you can have the following workflow:
robbiev / priority_select.go
Last active Nov 26, 2019
select with priority in go
View priority_select.go
// see!topic/golang-nuts/ChPxr_h8kUM
func maybe(b bool, c chan int) chan int {
if !b {
return nil
return c
select {
robbiev / hello_vertx.clj
Created Sep 8, 2013
Example Vert.x Clojure verticle
View hello_vertx.clj
(ns hello
(:require [vertx.http :as http]))
(-> (http/server)
#(-> %
(http/add-header "Content-Type" "text/html")
(http/end "<html><head/><body></body><h1>Clojure + Vert.x</h1></html>")))
(http/listen 8080 ""))
You can’t perform that action at this time.