Skip to content

Instantly share code, notes, and snippets.


Oskar Maria Grande musha68k

View GitHub Profile
musha68k /
Last active April 2, 2017 20:33
List operations
let rec fold ~init ~f = function
[] -> init
| x :: xs -> fold ~init:(f init x) ~f xs
let length xs =
|> fold ~init:0 ~f:(fun acc _ -> acc + 1)
let reverse xs =
musha68k / vcard_converter.rb
Created February 12, 2016 00:22
Converts multiple single person 2.1 vcard files from a Nokia dumb-phone export (".vcf") into one iCloud web contacts importable vcards collection file
View vcard_converter.rb
#!/usr/bin/env ruby
require 'vpim'
require 'vcardio'
files = Dir.glob "*.vcf"
vcards = do |f|
vc_old = Vpim::Vcard.decode([0]
# proper vcard 4.0 wasn't accepted by the iCLoud web-interface

Keybase proof

I hereby claim:

  • I am musha68k on github.
  • I am musha68k ( on keybase.
  • I have a public key whose fingerprint is 3AC3 9645 FDE9 3C57 6A42 451A 56DA C4A3 1372 6D99

To claim this, I am signing this object:

musha68k /
Last active January 13, 2016 17:15
Docker based development on OSX


  1. our base operating system is Mac OSX which we will simply call osx

  2. on top of osx we run a hypervisor (e.g. xhyve, vmware, virtualbox)

  3. on top of our hypervisor we are running a virtual machine with CoreOS as our docker_engine (with the help of or without vagrant)

  4. on top of our docker_engine we run an arbitrary set of docker_container instances most of which are comprised of a "bespoke" docker_image of our own; a certain "microservice" in development

musha68k /
Last active November 28, 2015 18:33 — forked from dustinblackman/
Load env variables from ZSH for Atom
# the shotgun way..
exec = require('child_process').exec
exec('source ~/.zshrc')
musha68k / alias_osx_notification_center.txt
Last active November 28, 2015 18:31
Alias for OSX Notification Center notification
View alias_osx_notification_center.txt
notify_me() {
osascript -e "display notification \"$1\" with title \"$2\""
alias notify_me=notify_me
musha68k / vagrant_with_docker_engine.txt
Last active November 28, 2015 18:30
Vagrant with Docker Engine
View vagrant_with_docker_engine.txt
We need a Docker container engine which will enable us to run docker containers on OSX.
So the first step to get there is to create a Vagrant virtual machine image with the provider of your choice.
Vagrant.configure(2) do |config| = 'ubuntu/trusty64'
musha68k /
Last active September 27, 2018 16:56
Set system dates for all running vagrant instances like a savage (🔨👈)

How to fix skewed system times on multiple vagrant instances 🍻

Set current date of darwin/osx on all local vagrant instances:

date | pbcopy && vagrant status | grep running | awk '{print $1}' | xargs -I {} vagrant ssh {} -c "sudo date --s \"$(pbpaste)\""

Set current date of darwin/osx on all vagrant instances:

date | pbcopy && vagrant global-status | grep running | awk '{print $1}' | xargs -I {} vagrant ssh {} -c "sudo date --s \"$(pbpaste)\""
View 0 Himawari Scraper