Skip to content

Instantly share code, notes, and snippets.

Avatar

Allan Ralph Hutalla aputs

  • Earth
  • Philippines
View GitHub Profile
@aputs
aputs / logrotate-nginx
Created Jun 12, 2010
logrotate config for nginx
View logrotate-nginx
/var/log/nginx_*.log {
daily
compress
delaycompress
rotate 2
missingok
nocreate
sharedscripts
postrotate
test ! -f /var/run/nginx.pid || kill -USR1 `cat /var/run/nginx.pid`
@aputs
aputs / boot.properties
Created Sep 29, 2016
re-natal reagent figwheel repl with boot-clj
View boot.properties
#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
@aputs
aputs / pyenv_install_python
Created Dec 2, 2020
pyenv install python versions on big sur
View pyenv_install_python
export MACOSX_DEPLOYMENT_TARGET=11.0
brew install pyenv bzip2 zlib xz openssl@1.1
## 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 / replace-centos6x-iptables
Last active Feb 28, 2022
replace centos 6.x iptables
View replace-centos6x-iptables
# compile iptables from source and install to /usr/local
mkdir -p /tmp/iptables
wget "http://www.netfilter.org/projects/iptables/files/iptables-1.4.21.tar.bz2" -qO- | tar --strip-components=1 -C /tmp/iptables -xvj
cd /tmp/iptables
./configure
make
make install
# set alternatives
sudo alternatives --install /sbin/iptables iptables.x86_64 /usr/local/sbin/iptables 100 \
@aputs
aputs / jwt.cljs
Created Sep 21, 2016
clojurescript JWT encode/decode (SHA version only)
View jwt.cljs
(ns cljsjs.jwt
(:require
[clojure.spec :as s]
[clojure.string :as str]
[goog.json :as json]
[goog.crypt.base64 :refer [encodeString decodeString]]))
;; https://github.com/Caligatio/jsSHA
;; goog.crypt.hmac produces different signature than nodejs version
(def jssha (js/require "jssha"))
@aputs
aputs / centos7-kickstart-iso.sh
Last active Dec 18, 2019
centos7 kickstart iso creation
View centos7-kickstart-iso.sh
# Mandatory Files: copied from Centos7 ISO installer (minimal/full dvd)
#
# $ROOT/cdroot/.discinfo
# $ROOT/cdroot/LiveOS/squashfs.img
# $ROOT/cdroot/isolinux/boot.cat
# $ROOT/cdroot/isolinux/initrd.img
# $ROOT/cdroot/isolinux/isolinux.bin
# $ROOT/cdroot/isolinux/vmlinuz
#
@aputs
aputs / .gitconfig
Last active Nov 28, 2019
.myconfig
View .gitconfig
[user]
name = Allan Ralph Hutalla
email = ahutalla@gmail.com
[alias]
ci=commit
co=checkout
br=branch
di=diff
st=status
@aputs
aputs / settings.json
Last active Nov 13, 2019
osx vscode settings.json
View settings.json
{
"terraform.indexing": {
"enabled": true,
"liveIndexing": false,
"delay": 500,
"exclude": [
".terraform/**/*",
"**/.terraform/**/*",
"**/bazel-**/*"
]
@aputs
aputs / keybindings.json
Last active Nov 10, 2019
windows vscode keybindings for terminal resizing
View keybindings.json
// 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 / settings.json
Last active Nov 10, 2019
windows vscode user settings
View settings.json
{
"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": [
{