Skip to content

Instantly share code, notes, and snippets.

Oskar Boethius Lissheim avocade

Block or report user

Report or block avocade

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View CockroachDB on Kubernetes tutorial 2017-06
# Make sure that you’ve installed minikube and run `minikube start` to get your Kubernetes cluster running.
minikube version (should be at least 0.19.0)
minikube start
kubectl version (should be at least 1.6.0 for both client and server)
-------------------
# Create the CockroachDB cluster and other relevant resources
kubectl create -f https://bit.ly/crdb-k8s-yaml
@avocade
avocade / erl-observe.sh
Created Feb 22, 2017
Connect to remote erlang node with remote iex session (eg over k8s port-forwarding), and start observer on it
View erl-observe.sh
#!/bin/bash
# This script provides easy way to debug remote Erlang nodes that is running in a kubernetes cluster.
# Usage: ./erl-observe.sh -l app=my_all -n default -c erlang_cookie
#
# Don't forget to include `:runtime_tools` in your mix.exs application dependencies.
set -e
# Trap exit so we can try to kill proxies that has stuck in background
function cleanup {
echo " - Stopping kubectl proxy."
@yossorion
yossorion / what-i-wish-id-known-about-equity-before-joining-a-unicorn.md
Last active Jan 17, 2020
What I Wish I'd Known About Equity Before Joining A Unicorn
View what-i-wish-id-known-about-equity-before-joining-a-unicorn.md

What I Wish I'd Known About Equity Before Joining A Unicorn

Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.

This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would

@kevin-smets
kevin-smets / 1_kubernetes_on_macOS.md
Last active Jan 16, 2020
Local Kubernetes setup on macOS with minikube on VirtualBox and local Docker registry
View 1_kubernetes_on_macOS.md

Requirements

Minikube requires that VT-x/AMD-v virtualization is enabled in BIOS. To check that this is enabled on OSX / macOS run:

sysctl -a | grep machdep.cpu.features | grep VMX

If there's output, you're good!

Prerequisites

@tomysmile
tomysmile / memcached_macosx.md
Created Apr 26, 2016
Installing memcached on Mac with Homebrew and Lunchy
View memcached_macosx.md

Installing memcached on Mac with Homebrew and Lunchy

This is a quick guide for installing memcached on a Mac with Homebrew, and starting and stopping it with Lunchy. I hope this tutorial will get your memcached up and running in no time.

Step 1 — Install Homebrew

Installing Homebrew is super easy. Just paste this in your terminal —

$ ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
@jasongilman
jasongilman / atom_clojure_setup.md
Last active Jan 15, 2020
This describes how I setup Atom for Clojure Development.
View atom_clojure_setup.md

Atom Clojure Setup

This describes how I setup Atom for an ideal Clojure development workflow. This fixes indentation on newlines, handles parentheses, etc. The keybinding settings for enter (in keymap.cson) are important to get proper newlines with indentation at the right level. There are other helpers in init.coffee and keymap.cson that are useful for cutting, copying, pasting, deleting, and indenting Lisp expressions.

Install Atom

Download Atom

The Atom documentation is excellent. It's highly worth reading the flight manual.

View specter-example.clj
(def MOVIES
[{:name "Lethal Weapon", :director "Paul Verhoeven", :rating 7.6}
{:name "RoboCop", :director "George P. Cosmatos", :rating 7.5}
{:name "Bad Movie", :director "James Cameron", :rating 4.2}
{:name "Great Movie", :director "James Cameron", :rating 10.0}
{:name "Lethal Weapon 3", :director "Ted Kotcheff", :rating 6.6}
{:name "Rambo III", :director "John McTiernan", :rating 5.4}
{:name "The Terminator", :director "Peter MacDonald", :rating 8.1}
{:name "Titanic", :director "James Cameron", :rating 8.3}
@karpathy
karpathy / min-char-rnn.py
Last active Jan 20, 2020
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
View min-char-rnn.py
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
View AppDelegate.swift
//
// AppDelegate.swift
// TypedTableViewControllers
//
// Created by Chris Eidhof on 23/03/15.
// Copyright (c) 2015 Unsigned Integer. All rights reserved.
//
import UIKit
@ColinEberhardt
ColinEberhardt / gist:b4bf4e4566ffa88afcda
Created Mar 20, 2015
Pipe forward operator and curried free functions = fluent interface
View gist:b4bf4e4566ffa88afcda
// meet Stringy - a simple string type with a fluent interface
struct Stringy {
let content: String
init(_ content: String) {
self.content = content
}
func append(appendage: Stringy) -> Stringy {
You can’t perform that action at this time.