Skip to content

Instantly share code, notes, and snippets.

const NodeAbac = require('node-abac');
const myPolicy = {
"attributes": {
"user": {
"org": "Organization"
},
"group": {
"id": "Group ID"
}
@rhalldearn
rhalldearn / d-ipconfig.bat
Created August 16, 2018 22:03
docker-ipconfig
@echo off
docker container inspect --format "{{.NetworkSettings.Networks.bridge.IPAddress }}" %1
@rhalldearn
rhalldearn / keycloak_curl_newrealm_example
Created December 27, 2017 20:10
Keycloak login to new realm
curl -X POST 'http://localhost:8080/auth/realms/mynewrealm/protocol/openid-connect/token' \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "username=user" \
-d 'password=password'\
-d 'grant_type=password'\
-d 'client_id=admin-cli'
#sudo code:
#See: http://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-optimized_AMI.html
#run this on host with new /dev/sdb EBS volume (100G) added to launch configuration, then
#execute these on the host machine (see above post):
vgextend docker /dev/sdb
vgs
lvextend -L+100G /dev/docker/docker-pool
docker info
@rhalldearn
rhalldearn / mediakeys.ahk
Created February 15, 2017 16:10
Windows 10 media keys for Spotify on Lenovo P50
# Good for Lenovo P50 as it has numberpad
# install auto hot key e.g.
# choco install autohotkey
# Create shortcut key file 'mediakeys.ahk':
^!NumpadLeft::Send {Media_Prev}
^!NumpadDown::Send {Media_Play_Pause}
^!NumpadRight::Send {Media_Next}