Skip to content

Instantly share code, notes, and snippets.

View alexanderjeurissen's full-sized avatar

Alexander Jeurissen alexanderjeurissen

View GitHub Profile
@alexanderjeurissen
alexanderjeurissen / main.go
Created August 13, 2023 12:24
json deserialisation in Go
package main
import (
"encoding/json"
"fmt"
)
type Person struct {
Name string `json:"naam"`
Age int `json:"leeftijd"`
t.prefs_.set('color-palette-overrides',[
"#073642",
"#dc322f",
"#859900",
"#b58900",
"#268bd2",
"#d33682",
"#2aa198",
"#eee8d5",
"#002b36",

Keybase proof

I hereby claim:

  • I am alexanderjeurissen on github.
  • I am alexanderjeuriss (https://keybase.io/alexanderjeuriss) on keybase.
  • I have a public key ASCpEx-csHMHh317Z0S8DS3yk0HfFgXLjSXyhobgQiWc6go

To claim this, I am signing this object:

@alexanderjeurissen
alexanderjeurissen / rename_master_to_main
Last active June 19, 2020 23:46
Rename github master branch to main, change default github branch automatically using `hub. invoke as: rename_master_to_main username/repo
#!/usr/bin/env zsh
set -e
function echoStep {
export __TOTAL_START="${__TOTAL_START:-$(date +'%s')}"
__STEP=$1
__STEP_START=$(date +'%s')
printf $'\e[37;44m\033[1m'"$1"
echo $'\033[0m'
@alexanderjeurissen
alexanderjeurissen / vimiumsettings.vim
Last active March 25, 2017 13:11
Vimium settings
" Scroll down with C-d, and up with <c-u>
map <c-d> scrollPageDown
map <c-u> scrollPageUp
" close tab with d
unmap d
unmap x
map d removeTab
" Use u to undo tab close instead of X
### Keybase proof
I hereby claim:
* I am alexanderjeurissen on github.
* I am ajeurissen (https://keybase.io/ajeurissen) on keybase.
* I have a public key ASAql6KYoz33wF0zCCJlU7xmzMJ3aeGQts2GG3SXjwT65Ao
To claim this, I am signing this object:
#!/bin/bash
# original author of this snippet: Esjee
monitor=`xrandr | grep -i edp | cut -d " " -f 1`
xrandr --newmode "1440x900_60.00" 106.50 1440 1528 1672 1904 900 903 909 934 -hsync +vsync
xrandr --addmode $monitor 1440x900_60.00
xrandr --output $monitor --mode 1440x900_60.00
@alexanderjeurissen
alexanderjeurissen / browse
Last active January 28, 2017 13:36
Fuzzy select a Arcanist differential to either browse or land
browse() {
case $1 in
acc)
diffs=`arc list | grep 'Accepted' | egrep -o 'D\d+: .*'`
;;
rev)
diffs=`arc list | grep 'Needs Review' | egrep -o 'D\d+: .*'`
;;
@alexanderjeurissen
alexanderjeurissen / devicons.py
Created May 5, 2016 16:32
Linemode that shows WebDevIcons in Ranger
#!/usr/bin/python
# coding=UTF-8
import re;
import os;
# all those glyphs will show as weird squares if you don't have the correct patched font
file_node_extensions = {
'.styl' : '',
'.scss' : '',
'.htm' : '',
@alexanderjeurissen
alexanderjeurissen / .cvimrc
Last active July 4, 2017 15:59
Chromium vim extension configuration file
" Position bar at bottom like vimperator
let barposition = "bottom"
" Use <C-d> and <C-u> to scroll like in vimperator
map <C-u> scrollPageUp
map <C-d> scrollPageDown
" Use d for closing tab and u for undo close tab
" like in vimperator
unmap d