Skip to content

Instantly share code, notes, and snippets.

Allan Ralph Hutalla aputs

Block or report user

Report or block aputs

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
aputs / keybindings.json
Created Sep 21, 2019
vscode keybindings for terminal resizing
View keybindings.json
// Place your key bindings in this file to override the defaults
"key": "ctrl+shift+q",
"command": "workbench.action.toggleMaximizedPanel"
"key": "ctrl+shift+down",
"command": "workbench.action.terminal.resizePaneDown",
"when": "terminalFocus"
aputs /
Last active Sep 10, 2019
django runserver with asyncio
replacement runserver for django with asyncio support
import errno
import os
import sys
import socket
import asyncio
import aiomonitor
aputs /
Created Sep 15, 2018
add support for redis sentinel on django-redis
# -*- coding: utf-8 -*-
import logging
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from redis.sentinel import Sentinel
from django_redis.client import DefaultClient
aputs /
Created Nov 20, 2016 — forked from twobitfool/
Create a SmartOS VM in VirtualBox
# Creates a SmartOS VM in VirtualBox (assuming you alread have VirtualBox installed)
# This script will:
# * Download the latest live ISO image of SmartOS
# * Create a VirtualBox VM, or update an existing VM with the latest ISO
# * Configure the VM with a zones disk, and boot it!
View docker-lvm-arch
lvcreate --wipesignatures y -n thinpool arch -L 100G
lvcreate --wipesignatures y -n thinpoolmeta arch -L 1G
lvconvert -y --zero n -c 512K --thinpool arch/thinpool --poolmetadata arch/thinpoolmeta
cat <<EOF | tee /etc/lvm/profile/docker-thinpool.profile
activation {
aputs /
Created Sep 29, 2016
re-natal reagent figwheel repl with boot-clj
#Wed Sep 28 14:53:54 PHT 2016
aputs / jwt.cljs
Created Sep 21, 2016
clojurescript JWT encode/decode (SHA version only)
View jwt.cljs
(ns cljsjs.jwt
[clojure.spec :as s]
[clojure.string :as str]
[goog.json :as json]
[goog.crypt.base64 :refer [encodeString decodeString]]))
;; goog.crypt.hmac produces different signature than nodejs version
(def jssha (js/require "jssha"))
aputs /
Last active Sep 15, 2017
centos7 kickstart iso creation
# Mandatory Files: copied from Centos7 ISO installer (minimal/full dvd)
# $ROOT/cdroot/.discinfo
# $ROOT/cdroot/LiveOS/squashfs.img
# $ROOT/cdroot/isolinux/
# $ROOT/cdroot/isolinux/initrd.img
# $ROOT/cdroot/isolinux/isolinux.bin
# $ROOT/cdroot/isolinux/vmlinuz
aputs / pacman.conf
Created Nov 9, 2014
minimal pacman config
View pacman.conf
NoUpgrade = etc/passwd etc/group etc/shadow
NoUpgrade = etc/pacman.conf
NoExtract = usr/share/doc/*
NoExtract = usr/share/info/*
NoExtract = usr/share/man/*
NoExtract = usr/share/locale/[a-d,f-k,m-z]*
NoExtract = usr/share/locale/e[a-m,o-z]*
NoExtract = usr/share/locale/l[a-n,p-z]*
NoExtract = usr/share/locale/lo
aputs / nspawn-docker-image
Created Nov 7, 2014
run systemd-nspawn on btrfs docker image snapshot
View nspawn-docker-image
btrfs subvolume snapshot $docker_root/$subvolumes/$(docker inspect --format='{{.Id}}' $docker_image) $dest_dir
systemd-nspawn -D $dest_dir
You can’t perform that action at this time.