Skip to content

Instantly share code, notes, and snippets.

View RobbieMcKinstry's full-sized avatar

Robbie McKinstry RobbieMcKinstry

View GitHub Profile
@mitchellh
mitchellh / example.nix
Created May 10, 2020 16:29
Nix function for creating a derivation (package) that installs binaries from releases.hashicorp.com
self: super: {
consul-bin = self.callPackage ./hashicorp-generic.nix {
name = "consul";
version = "1.7.3";
sha256 = "0k03n7h5h8miqhh3n3y47894vhwdcp8m611w55f826swmq9angl1";
};
# and so on...
}
@alisdair
alisdair / intensify.sh
Created May 21, 2019 23:44
intensifies Slack emoji creator
#!/bin/bash
# Generate a `:something-intensifies:` Slack emoji, given a reasonable image
# input. I recommend grabbing an emoji from https://emojipedia.org/
set -euo pipefail
# Number of frames of shaking
count=10
# Max pixels to move while shaking
@bodil
bodil / electric_wadleroo.rs
Last active January 28, 2019 22:52
Who needs higher kinded types anyway
trait Higher<A, B> {
type Target;
}
trait Higher3<A, B, C> {
type Target2;
type Target3;
}
impl<A, B> Higher<A, B> for Option<A> {

In a terminal start a server.

$ python -m SimpleHTTPServer 8000

In another terminal set up the cgroups freezer.

PostgreSQL Type PostgreSQL Size Description Range Diesel Type Rust Type
Nullable Types nullable Nullable``
[[constraint]]
name="k8s.io/apimachinery"
revision="1fd2e63a9a370677308a42f24fd40c86438afddf"
[[constraint]]
name="k8s.io/client-go"
branch="release-4.0"
@alexlafroscia
alexlafroscia / Ember Server Dockerfile
Last active August 29, 2015 14:18
Dockerfile for running the Ember Server
# =====================================================================
# Commands
#
# Build the image
# docker run build
#
# Run the server
# docker run --name ember -v $(pwd):/usr/src/app -P ember server
#
# =====================================================================
@dnegstad
dnegstad / Brocfile.js
Last active January 2, 2019 17:50
Polymer WebComponents in ember-cli >= 0.0.41
var EmberApp = require('ember-cli/lib/broccoli/ember-app');
var pickFiles = require('broccoli-static-compiler');
var mergeTrees = require('broccoli-merge-trees');
var vulcanize = require('broccoli-vulcanize');
var app = new EmberApp();
var polymerVulcanize = vulcanize('app', {
input: 'elements.html',
output: 'assets/vulcanized.html',
@w1shen
w1shen / dispatch.scala
Last active April 18, 2017 03:40
Post JSON by Dispatch
val req = url("localhost").POST
.as_!("username", "password")
.setBody("body")
.setContentType("application/json", "UTF-8")
val future = Http(req OK as.String)
val rep = Await.result(future, 5.seconds)