Skip to content

Instantly share code, notes, and snippets.

View aputs's full-sized avatar

Allan Ralph Hutalla aputs

  • Earth
  • Philippines
View GitHub Profile
@aputs
aputs / pyenv_install_python
Created December 2, 2020 15:13
pyenv install python versions on big sur
export MACOSX_DEPLOYMENT_TARGET=11.0
brew install pyenv bzip2 zlib xz [email protected]
## 3.6.8
CFLAGS="-I$(brew --prefix openssl)/include -I$(brew --prefix bzip2)/include -I$(brew --prefix readline)/include -I$(xcrun --show-sdk-path)/usr/include" LDFLAGS="-L$(brew --prefix openssl)/lib -L$(brew --prefix readline)/lib -L$(brew --prefix zlib)/lib -L$(brew --prefix bzip2)/lib" pyenv install --patch 3.6.8 < <(curl -sSL https://github.com/python/cpython/commit/8ea6353.patch\?full_index\=1)
## 3.6.12
CFLAGS="-I$(brew --prefix openssl)/include -I$(brew --prefix bzip2)/include -I$(brew --prefix readline)/include -I$(xcrun --show-sdk-path)/usr/include" LDFLAGS="-L$(brew --prefix openssl)/lib -L$(brew --prefix readline)/lib -L$(brew --prefix zlib)/lib -L$(brew --prefix bzip2)/lib" pyenv install --patch 3.6.12 < <(curl -sSL https://github.com/python/cpython/commit/8ea6353.patch\?full_index\=1)
## 3.7.9
@aputs
aputs / .gitconfig
Last active November 28, 2019 14:15
.myconfig
[user]
name = Allan Ralph Hutalla
email = [email protected]
[alias]
ci=commit
co=checkout
br=branch
di=diff
st=status
@aputs
aputs / settings.json
Last active November 13, 2019 06:13
osx vscode settings.json
{
"terraform.indexing": {
"enabled": true,
"liveIndexing": false,
"delay": 500,
"exclude": [
".terraform/**/*",
"**/.terraform/**/*",
"**/bazel-**/*"
]
@aputs
aputs / settings.json
Last active November 10, 2019 13:14
windows vscode user settings
{
"workbench.colorTheme": "Material Theme Darker High Contrast",
"vim.easymotion": true,
"vim.sneak": true,
"vim.incsearch": true,
"vim.useSystemClipboard": true,
"vim.useCtrlKeys": true,
"vim.hlsearch": true,
"vim.insertModeKeyBindings": [
{
@aputs
aputs / keybindings.json
Last active November 10, 2019 13:15
windows vscode keybindings for terminal resizing
// Place your key bindings in this file to override the defaults
[
{
"key": "ctrl+shift+j",
"command": "workbench.action.toggleMaximizedPanel"
},
{
"key": "ctrl+shift+down",
"command": "workbench.action.terminal.resizePaneDown",
"when": "terminalFocus"
@aputs
aputs / devserver.py
Last active September 10, 2019 11:59
django runserver with asyncio
"""
replacement runserver for django with asyncio support
"""
import errno
import os
import sys
import socket
import asyncio
import aiomonitor
@aputs
aputs / redis_sentinel.py
Created September 15, 2018 05:41
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
aputs / create-smartos-vm.sh
Created November 20, 2016 20:54 — forked from twobitfool/create-smartos-vm.sh
Create a SmartOS VM in VirtualBox
#!/bin/sh
#
# 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!
#
#
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 {
thin_pool_autoextend_threshold=80
thin_pool_autoextend_percent=20
}
@aputs
aputs / boot.properties
Created September 29, 2016 15:10
re-natal reagent figwheel repl with boot-clj
#http://boot-clj.com
#Wed Sep 28 14:53:54 PHT 2016
BOOT_CLOJURE_NAME=org.clojure/clojure
BOOT_CLOJURE_VERSION=1.9.0-alpha12
BOOT_VERSION=2.6.0