Skip to content

Instantly share code, notes, and snippets.

tungd / react-helper.js
Last active Nov 30, 2018
React Helper to initialize the component from HTML, similar to AngularJS.
View react-helper.js
* react-helper.js
* Helper for Facebook's React UI Library. Add support for declare
* component on DOM (similar to AngularJS Directive).
* Usage:
* - Register a component:
* ReactHelper.register('MyComponent', MyComponent)
* - Declare the DOM node:
abenoit /
Last active Apr 3, 2019
ReasonML Binding for react-click-outside
[@bs.module "react-click-outside"]
external clickOutside: ReasonReact.reactClass = "default";
[@bs.deriving abstract]
type jsProps = {
className: option(string),
onClickOutside: ReactEvent.Mouse.t => unit,
let make = (~className=?, ~onClickOutside, children) =>

Kubernetes API Internals Codebase Walkthrough

The JSON file included in this gist gives a codebase walkthrough of the resource handling in the k8s apiserver.

The codebase walkthrough is created using CodeTour VS Code extension. To display the walkthrough in VS Code, use the JSON file using the Opening Tours functionality.

You might need to first open the workspace at the apiserver directory.

bellbind / main.js
Last active Sep 13, 2022
[electron] Tray launcher example
View main.js
"use strict";
// [run the app]
// $ npm install electron
// $ ./node_modules/.bin/electron .
const {app, nativeImage, Tray, Menu, BrowserWindow} = require("electron");
let top = {}; // prevent gc to keep windows
mjambon /
Created Jun 2, 2019
OCaml functions for printing a tree in a terminal like the 'tree' command
Created by Martin Jambon and placed in the Public Domain on June 1, 2019.
Print a tree or a DAG as tree, similarly to the 'tree' command.
open Printf
let rec iter f = function
| [] -> ()
simonista / .vimrc
Last active Sep 18, 2022
A basic .vimrc file that will serve as a good template on which to build.
View .vimrc
" Don't try to be vi compatible
set nocompatible
" Helps force plugins to load correctly when it is turned back on below
filetype off
" TODO: Load plugins here (pathogen or vundle)
" Turn on syntax highlighting
syntax on
jatcwang / gist:ae3b7019f219b8cdc6798329108c9aee
Created Feb 2, 2017
List of all setxkbmap configuration options (including models/layout/etc)
View gist:ae3b7019f219b8cdc6798329108c9aee
! model
pc101 Generic 101-key PC
pc102 Generic 102-key (Intl) PC
pc104 Generic 104-key PC
pc105 Generic 105-key (Intl) PC
dell101 Dell 101-key PC
latitude Dell Latitude series laptop
dellm65 Dell Precision M65
everex Everex STEPnote
flexpro Keytronic FlexPro
FreddieOliveira /
Last active Sep 27, 2022
This tutorial shows how to run docker natively on Android, without VMs and chroot.

Docker on Android 🐋📱

Edit 🎉

All packages, except for Tini have been added to termux-root. To install them, simply pkg install root-repo && pkg install docker. This will install the whole docker suite, left only Tini to be compiled manually.


View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:


start new with session name:

tmux new -s myname