Skip to content

Instantly share code, notes, and snippets.

View iknite's full-sized avatar
👨‍🚀
over the shoulders of giants

Enrique Paredes iknite

👨‍🚀
over the shoulders of giants
View GitHub Profile
#!/bin/sh
set -o errexit
# create registry container unless it already exists
reg_name='kind-registry'
reg_port='5000'
running="$(docker inspect -f '{{.State.Running}}' "${reg_name}" 2>/dev/null || true)"
if [ "${running}" != 'true' ]; then
docker run \
-d --restart=always -p "${reg_port}:5000" --name "${reg_name}" \
@iknite
iknite / keybase-gpg.md
Last active April 3, 2020 14:58
keybase gpg and git-crypt

gen key

gpg --full

gpg -> keybase

gpg --list-keys

Keybase proof

I hereby claim:

  • I am iknite on github.
  • I am iknite (https://keybase.io/iknite) on keybase.
  • I have a public key ASA8-2s20y-z6qQ4EVSLZWXPbGRueerecWadjCFMG6tYVQo

To claim this, I am signing this object:

https://en.wikipedia.org/wiki/Computer_science

Theoretical computer science

Data structures and algorithms

Analysis of algorithms, Algorithms, Data structures, Combinatorial optimization, Computational geometry

Theory of computation

Automata theory, Computability theory, Computational complexity theory, Cryptography, Quantum computing theory

@iknite
iknite / Makefile
Created May 16, 2017 12:39
Makefile recipes
.DEFAULT_GOAL := install
# Environment
ENV ?= .env
ENV_VARS ?= AWS_PROFILE AWS_REGION
ENV_GEN := $(shell ./.env.gen ${ENV} ${ENV_VARS} 1>&2)
include ${ENV}
export $(shell sed 's/=.*//' ${ENV})

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@iknite
iknite / delayPromise.js
Last active December 10, 2015 12:28
Delay based in jQuery Deferred object.
(function (window, scope, undefined){
"use strict";
var $ = window.jQuery;
scope.delay = function (timeout){
var $d = $.Deferred(),
t = timeout || 0;
setTimeout(function (){