Skip to content

Instantly share code, notes, and snippets.

View milch's full-sized avatar

Manu Wallner milch

  • AWS
  • Seattle, WA
View GitHub Profile
@milch
milch / .tmux.conf
Created December 8, 2017 17:41
My tmux config
# Use powerline as bottom bar: https://powerline.readthedocs.io/en/master/installation.html#pip-installation
run-shell "powerline-daemon -q"
source "/usr/local/lib/python3.6/site-packages/powerline/bindings/tmux/powerline.conf"
# reattach-to-user-namespace is necessary for iOS simulator and pbcopy/pbpaste to work from tmux
# also configures tmux to use fish shell
set-option -g default-command 'reattach-to-user-namespace -l fish'
# Enable TrueColor support
set-option -ga terminal-overrides ",xterm-256color:Tc"
@milch
milch / Example.swift
Created June 22, 2017 13:48
Simple, type-safe, redux-like implementation in Swift
// For use in a playground
import UIKit
import XCPlayground
// Needed because dispatch/subscribe uses GCD for thread-safety, so everything is done in a background queue
XCPlaygroundPage.currentPage.needsIndefiniteExecution = true
struct CookieJar {
let numberOfCookies : UInt
@milch
milch / mail_to_notes.rb
Last active April 8, 2024 01:38
Ruby script to convert a mail (.eml/.emlx) file to a note in macOS Notes.app.
require 'base64'
require 'digest'
require 'mail'
require 'nokogiri'
require 'shellwords'
file = ARGV.first
puts "Processing file #{file}"
contents = File.read(file)
update_fastlane
fastlane_version "1.57.0"
before_all do
ensure_git_status_clean
end
lane :build do |p|
ensure_docker_machine_available
//
// NSDate+FastParse.m
//
// Created by Manu Wallner on 02.08.13.
// Copyright (c) 2013 XForge Software Development. All rights reserved.
//
#import "NSDate+FastParse.h"
typedef struct date_time {
@milch
milch / main.m
Created September 11, 2013 15:19
#import "NSDate+FastParse.h"
#import <Foundation/Foundation.h>
#import "sqlite3.h"
typedef int64_t timestamp;
NSUInteger randomNumberInRange(NSUInteger start, NSUInteger end);
// Create a sample date using the ISO-8601 format.
// 2013-04-23T16:29:05Z