Skip to content

Instantly share code, notes, and snippets.

View cimarron-pistoncloud's full-sized avatar

Cimarron Taylor cimarron-pistoncloud

View GitHub Profile
@cimarron-pistoncloud
cimarron-pistoncloud / scalaz-nel.scala
Created May 16, 2018 20:13 — forked from manjuraj/scalaz-nel.scala
scalaz NonEmptyList (NEL)
//
// NonEmptyList (Nel)
// - A singly-linked list that is guaranteed to be non-empty
// - https://github.com/scalaz/scalaz/blob/series/7.2.x/core/src/main/scala/scalaz/NonEmptyList.scala
//
final class NonEmptyList[+A](val head: A, val tail: List[A]) {
...
}
//
@cimarron-pistoncloud
cimarron-pistoncloud / slack_history.py
Created August 17, 2017 18:56 — forked from Chandler/slack_history.py
Download Slack Channel/PrivateChannel/DirectMessage History
# MIT License
# Copyright (c) 2016 Chandler Abraham
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
@cimarron-pistoncloud
cimarron-pistoncloud / pandoc.css
Created May 4, 2017 15:58 — forked from killercup/pandoc.css
Add this to your Pandoc HTML documents using `--css pandoc.css` to make them look more awesome. (Tested with Markdown and LaTeX.)
/*
* I add this to html files generated with pandoc.
*/
html {
font-size: 100%;
overflow-y: scroll;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
}
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "JSON API Schema",
"description": "This is a schema for responses in the JSON API format. For more, see http://jsonapi.org",
"x-oneOf": [
{
"$ref": "#/definitions/success"
},
{
"$ref": "#/definitions/failure"
@cimarron-pistoncloud
cimarron-pistoncloud / roles_invesitgation.md
Created March 28, 2017 19:44 — forked from facultymatt/roles_invesitgation.md
Roles and permissions system for Nodejs
@cimarron-pistoncloud
cimarron-pistoncloud / main.go
Created March 19, 2017 19:31 — forked from nmerouze/main.go
JSON-API with Go and MongoDB: Final Part
package main
import (
"encoding/json"
"log"
"net/http"
"reflect"
"time"
"github.com/gorilla/context"
@cimarron-pistoncloud
cimarron-pistoncloud / kubernetes_on_macOS.md
Created February 3, 2017 21:37 — forked from kevin-smets/1_kubernetes_on_macOS.md
Local Kubernetes setup on macOS with minikube on VirtualBox

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

@cimarron-pistoncloud
cimarron-pistoncloud / example.md
Created October 25, 2016 19:09 — forked from ericclemmons/example.md
HTML5 <details> in GitHub

Using <details> in GitHub

Suppose you're opening an issue and there's a lot noisey logs that may be useful.

Rather than wrecking readability, wrap it in a <details> tag!

<details>
 <summary>Summary Goes Here</summary>

There are three easy to make mistakes in go. I present them here in the way they are often found in the wild, not in the way that is easiest to understand.

All three of these mistakes have been made in Kubernetes code, getting past code review at least once each that I know of.

  1. Loop variables are scoped outside the loop.

What do these lines do? Make predictions and then scroll down.

func print(pi *int) { fmt.Println(*pi) }
@cimarron-pistoncloud
cimarron-pistoncloud / README.md
Created April 10, 2016 16:33 — forked from dergachev/README.md
Vagrant tutorial

Vagrant Setup

This tutorial guides you through creating your first Vagrant project.

We start with a generic Ubuntu VM, and use the Chef provisioning tool to:

  • install packages for vim, git
  • create user accounts, as specified in included JSON config files
  • install specified user dotfiles (.bashrc, .vimrc, etc) from a git repository

Afterwards, we'll see how easy it is to package our newly provisioned VM