Skip to content

Instantly share code, notes, and snippets.

View docker_image_downloader.sh
#!/usr/bin/env bash
set -eo pipefail
# from moby project - w/o go dependency (nailing amd64) and w/o jq dep (using
# python)
# hello-world latest ef872312fe1b 3 months ago 910 B
# hello-world latest ef872312fe1bbc5e05aae626791a47ee9b032efa8f3bda39cc0be7b56bfe59b9 3 months ago 910 B
# debian latest f6fab3b798be 10 weeks ago 85.1 MB
# debian latest f6fab3b798be3174f45aa1eb731f8182705555f89c9026d8c1ef230cbf8301dd 10 weeks ago 85.1 MB
@pwFoo
pwFoo / two-way-binding.js
Created Nov 24, 2018 — forked from straker/two-way-binding.js
Simple and small two-way data binding between DOM and data
View two-way-binding.js
/**
* @param {object} scope - Object that all bound data will be attached to.
*/
function twoWayBind(scope) {
// a list of all bindings used in the DOM
// @example
// { 'person.name': [<input type="text" data-bind="person.name"/>] }
var bindings = {};
// each bindings old value to be compared for changes
@pwFoo
pwFoo / generate-dropbear-key
Created Apr 26, 2018 — forked from hongkongkiwi/generate-dropbear-key
Generate SSH Key in Dropbear
View generate-dropbear-key
#!/bin/bash
KEY_DIR="/mnt/sda1/.ssh"
# Make directories
mkdir -p "$KEY_DIR"
# Generate an RSA key using dropbear
dropbearkey -t rsa -f "${KEY_DIR}/id_rsa"
@pwFoo
pwFoo / disable_vim_auto_visual_on_mouse.txt
Created Jul 2, 2017 — forked from u0d7i/disable_vim_auto_visual_on_mouse.txt
Disable vim automatic visual mode on mouse select
View disable_vim_auto_visual_on_mouse.txt
Disable vim automatic visual mode on mouse select
issue: :set mouse-=a
add to ~/.vimrc: set mouse-=a
@pwFoo
pwFoo / ajax-ic.js
Last active Mar 5, 2017
jqSlim - jQuery-like API super-tinyJavaScript library based on ki.js. Ajax-ic is a minimal IntercoolerJS inspired jqSlim plugin.
View ajax-ic.js
/**
* Load Module if DOM is ready
*/
$(function () {
/**
* GET click events
*/
$('[ic-get]').on('click', function () {
icAjax(this, 'GET')
});
@pwFoo
pwFoo / Caddyfile
Created Dec 12, 2016 — forked from talbergs/Caddyfile
Docker[ Caddy php7 ]
View Caddyfile
0.0.0.0:80
fastcgi / phpfmp:9000 php
@pwFoo
pwFoo / form-input.css
Created Dec 5, 2016
input checkbox / radio font awesome support
View form-input.css
/* hide default checkbox if checked */
input[type='checkbox'].fa-replace:checked,
input[type='radio'].fa-replace:checked {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
border:none;
border-radius: 0;
}
You can’t perform that action at this time.