Skip to content

Instantly share code, notes, and snippets.

View artburkart's full-sized avatar
💭
why

Arthur Burkart artburkart

💭
why
  • Coinbase
  • somewhere rainy, probably
View GitHub Profile
@artburkart
artburkart / dog_breeds_lowercase.json
Created June 25, 2014 23:10
dog breeds in JSON form
[
"affenpinscher",
"afghan hound",
"afghan shepherd",
"aidi",
"airedale terrier",
"akbash",
"akita inu",
"alano español",
"alaskan klee kai",
@artburkart
artburkart / gist:15b62f1a741eef0f74492860ab9dee9d
Last active December 30, 2020 16:21
Hammerspoon ShiftIt replacement (50% window tiling, maximize, change display)
-- https://www.hammerspoon.org/go/#window-sizing
-- https://stackoverflow.com/questions/54151343/how-to-move-an-application-between-monitors-in-hammerspoon
-- https://github.com/fikovnik/ShiftIt/issues/296#issuecomment-438386501
hs.hotkey.bind({"cmd", "alt", "ctrl"}, "r", function()
hs.reload()
end)
hs.alert.show("Config loaded")
hs.window.animationDuration = 0
units = {
@artburkart
artburkart / alert.js
Created September 14, 2018 07:27
alert.js
alert('testing xss vulnerability');

Keybase proof

I hereby claim:

  • I am artburkart on github.
  • I am artburkart (https://keybase.io/artburkart) on keybase.
  • I have a public key ASB73UEdBQZyOWG1_3u68txBcSBXj3KoXpXySbBrl-qWgwo

To claim this, I am signing this object:

@artburkart
artburkart / README.md
Last active July 15, 2019 10:24
creating self-signed cert openssl

Create private key and signing request:

openssl genrsa 4096 > privatekey.pem
openssl req -new -key privatekey.pem -out csr.pem -config config.ini

The output looks like this:

@artburkart
artburkart / password_command.sh
Created March 2, 2019 21:23
Command I sometimes use for generating passwords
#!/usr/bin/env bash
openssl rand -base64 100 | tr -dc A-Za-z0-9 | head -c32
@artburkart
artburkart / showperms.sh
Created October 1, 2018 05:44
Display perms on file as number
#!/usr/bin/env bash
# https://askubuntu.com/questions/152001/how-can-i-get-octal-file-permissions-from-command-line#152003
stat -c "%a %n" /usr/bin
stat -c "%a %n" *
@artburkart
artburkart / LambdaFunctionOverHttps.js
Last active August 30, 2018 02:36
testing_localstack_apigateway_lambda
console.log('Loading function');
var AWS = require('aws-sdk');
var dynamo = new AWS.DynamoDB.DocumentClient();
/**
* Provide an event that contains the following keys:
*
* - operation: one of the operations in the switch statement below
* - tableName: required for operations that interact with DynamoDB
@artburkart
artburkart / codedeploy_agent_install.yml
Last active August 13, 2018 21:33
Ansible scripts to install & run CodeDeploy not as unprivileged user on Ubuntu
---
- name: Update apt cache
apt: update_cache=yes
- name: Install Ruby
apt: pkg=ruby2.0 state=present
- block:
- name: Get CodeDeploy version
set_fact:
@artburkart
artburkart / route-eth0
Last active June 8, 2018 17:15
Persisting advmss across reboots
#!/bin/bash
# This takes advantage of the code in /etc/sysconfig/network-scripts/ifup-routes
# handle_file () {
# . $1
# routenum=0
# while [ "x$(eval echo '$'ADDRESS$routenum)x" != "xx" ]; do
# eval $(ipcalc -p $(eval echo '$'ADDRESS$routenum) $(eval echo '$'NETMASK$routenum))
# line="$(eval echo '$'ADDRESS$routenum)/$PREFIX"
# if [ "x$(eval echo '$'GATEWAY$routenum)x" != "xx" ]; then