Skip to content

Instantly share code, notes, and snippets.

@jazzdan
jazzdan / Tiltfile
Created July 26, 2019 16:22 — forked from chuckha/Tiltfile
tilt file for github.com/kubernetes-sigs/cluster-api-provider-docker
project = str(local('gcloud config get-value project')).strip()
read_file(str(local('which capdctl')).rstrip('\n'))
k8s_yaml(local('capdctl platform -capi-image gcr.io/kubernetes1-226021/cluster-api-controller-amd64:dev -bp-image gcr.io/kubernetes1-226021/cluster-api-bootstrap-provider-kubeadm:dev -bp-ref master'))
custom_build(
'gcr.io/' + project +'/manager',
'GOOS=linux go build ./cmd/manager && docker build -t $EXPECTED_REF .',
['.'],
ignore='manager',
@jazzdan
jazzdan / node.php
Last active February 25, 2017 22:06 — forked from anonymous/node.php
<?hh // strict
class Node {
private int $value;
public ?Node $left = null;
public ?Node $right = null;
public function __construct(int $value) {
$this->value = $value;
}
/*
* Copyright (C) 2008-2013 Stanislaw Findeisen <[email protected]>
*
* This file is part of phphard.
*
* phphard is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
@jazzdan
jazzdan / putonglasses.txt
Last active July 28, 2016 18:29 — forked from cheeaun/putonglasses.txt
put on glasses unicode
(•_•)
( •_•)>⌐■-■
(⌐■_■)
@jazzdan
jazzdan / main.hh
Last active August 29, 2015 14:24 — forked from anonymous/main.hh
<?hh
class Wrapper<Tval as num> {
private Tval $value;
public function __construct(Tval $value) {
$this->value = $value;
}
public function setValue(Tval $value): void {
$this->value = $value;
@jazzdan
jazzdan / main.hh
Last active August 29, 2015 14:24 — forked from anonymous/main.hh
<?hh
class Wrapper<Tval as num> {
private Tval $value;
public function __construct(Tval $value) {
$this->value = $value;
}
public function setValue(Tval $value): void {
$this->value = $value;
@jazzdan
jazzdan / caller.hh
Last active August 29, 2015 14:20 — forked from anonymous/main.php
<?hh // strict
class Caller {
public function set(string $property_name, Foo $object): void {
$object->$property_name = 'poopy';
}
public function call(string $property_name, Foo $object): string {
return $object->$property_name;
}
}

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@jazzdan
jazzdan / gist:5707802
Last active December 18, 2015 01:59 — forked from anonymous/gist:5707777
class A
@x = 0
def self.give_list
{
'blah' => :x
}
end
def self.run_it(obj)
@jazzdan
jazzdan / gist:1585752
Created January 9, 2012 23:51 — forked from colbyr/gist:1579888
Backbone-Handlebars View Template
/* base view template */
var ViewTemplate = Backbone.View.extend({
// containing element
el: $('body'),
// events
events: {},
// initialize