Skip to content

Instantly share code, notes, and snippets.

View ackerleytng's full-sized avatar

Ackerley Tng ackerleytng

View GitHub Profile
@ackerleytng
ackerleytng / remotes-schema.json
Created October 18, 2017 11:47
Using jsonschema to validate
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Remotes array",
"type": "array",
"items": {
"title": "Remote",
"type": "object",
"properties": {
"name": {
"description": "The name of this remote machine",
@ackerleytng
ackerleytng / mirror-0x-centos
Last active January 3, 2019 23:17
Mirroring centos from mirror.0x.sg
wget --recursive --no-parent --no-host-directories \
--reject 'index.html*' \
--exclude-directories 'centos/2*' \
--exclude-directories 'centos/3*' \
--exclude-directories 'centos/4*' \
--exclude-directories 'centos/5*' \
--exclude-directories 'centos/6*' \
--exclude-directories 'centos/7' \
--reject 'HEADER.html' \
--exclude-directories 'centos/HEADER.images' \
(ns snort-parser.core
(:require [instaparse.core :as insta]))
(def variables-parser
(insta/parser
"variable-definitions = variable-definition (newline variable-definition)* newline?
variable-definition = var | portvar | ipvar
var = 'var' whitespace variable-name whitespace var-value
var-value = #'\\S+'
Description='Sample netctl config for Wireless@SGx'
Interface=wlp2s0
Connection=wireless
Security=wpa-configsection
ESSID=Wireless@SGx
IP=dhcp
WPAConfigSection=(
'ssid="Wireless@SGx"'
'key_mgmt=WPA-EAP'
'eap=PEAP'
@ackerleytng
ackerleytng / README.md
Last active April 24, 2020 05:04
Vagrantfile for trying out keycloak-quickstarts/app-authz-photoz

Try app-authz-photoz

Note, this is different from app-authz-uma-photoz

Quickstart

vagrant up

Disambiguation of Authorization Terms

This is a preliminary attempt to coordinate the use of terms for authorization purposes.

There are many conflicting/duplicate definitions of terms in the world of authorization, because it is actually not easy to understand, and this has resulted in the use of different terms in different implementations.

In fact, this document https://profsandhu.com/workshop/role-group.pdf

@ackerleytng
ackerleytng / openwrt-stubby-dnstls.sh
Last active January 18, 2022 13:01
Script to easily configure openwrt for dnstls from cli on the router itself
#!/bin/sh
# Taken from https://openwrt.org/docs/guide-user/services/dns/dot_dnsmasq_stubby
# Provided so it's easy to run from command line
# Install packages
opkg update
opkg install dnsmasq stubby
# Enable DNS encryption
@ackerleytng
ackerleytng / .zprofile
Last active January 3, 2023 13:50
zsh config
if systemctl -q is-active graphical.target && [[ ! $DISPLAY && $XDG_VTNR -eq 1 ]]; then
exec startx
fi
@ackerleytng
ackerleytng / config.h
Created July 12, 2020 05:49
config.h for suckless terminal
/* See LICENSE file for copyright and license details. */
/*
* appearance
*
* font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html
*/
static char *font = "SauceCodePro Nerd Font Mono:style=Regular:pixelsize=13:antialias=true:autohint=true";
static int borderpx = 2;
! main x stuff
Xft.autohint: 0
Xft.lcdfilter: lcddefault
Xft.hintstyle: hintslight
Xft.hinting: true
Xft.antialias: true
Xft.rgba: rgb
Xft.dpi: 96