Skip to content

Instantly share code, notes, and snippets.

View fredr's full-sized avatar
:bowtie:
Hold my shovel

Fredrik Enestad fredr

:bowtie:
Hold my shovel
  • Stockholm, Sweden
View GitHub Profile
@fredr
fredr / datastore.go
Last active February 4, 2021 20:12
Flatten vs nested serialization
package main
import (
"encoding/json"
"fmt"
"cloud.google.com/go/datastore"
)
type Other struct {

Keybase proof

I hereby claim:

  • I am fredr on github.
  • I am fredr (https://keybase.io/fredr) on keybase.
  • I have a public key whose fingerprint is 84F2 CFAE 3173 B5BD BA6C 5AF5 C076 EEC1 1BF1 8939

To claim this, I am signing this object:

package main
import (
"fmt"
"log"
"time"
"github.com/vmihailenco/msgpack"
)
@fredr
fredr / unleash.js
Last active August 29, 2015 13:57
Unleash the Gremlins!! (https://github.com/marmelab/gremlins.js)
(function() {
var script = document.createElement('script');
script.async = 1;
script.src = 'https://raw.github.com/marmelab/gremlins.js/master/gremlins.min.js';
document.getElementsByTagName('body')[0].appendChild(script);
setTimeout(function() {
gremlins.createHorde().unleash();
}, 500)
})();
# vim:ft=zsh ts=2 sw=2 sts=2
#
# agnoster's Theme - https://gist.github.com/3712874
# A Powerline-inspired theme for ZSH
#
# # README
#
# In order for this theme to render correctly, you will need a
# [Powerline-patched font](https://github.com/Lokaltog/powerline-fonts).
#
@fredr
fredr / bookmarklet-runner.js
Last active May 4, 2022 16:40
A bookmarklet that will inject an external script in the browser. (minify, uri encode and add to the href prefixed with "javascript:" in your bookmark)
(function() {
var script = document.createElement('script');
script.async = 1;
script.src = '<url to script>';
document.getElementsByTagName('body')[0].appendChild(script);
})();