Skip to content

Instantly share code, notes, and snippets.

@lrvick
lrvick / WORKSPACE
Last active May 24, 2017 19:57
Non working go project with bazel
git_repository(
name = "io_bazel_rules_go",
remote = "https://github.com/bazelbuild/rules_go.git",
tag = "0.4.4",
)
load(
"@io_bazel_rules_go//go:def.bzl",
"go_repositories",
"new_go_repository",
)
@lrvick
lrvick / yubikey-provision-ssh.sh
Created August 3, 2017 22:09
Provision SSH key into Yubikey
#!/bin/bash
# Script to automate the provisioning of a new SSH certificate onto a yubikey device.
set -e
set -u
set -o pipefail
for path in "/usr/lib64/opensc-pkcs11.so" \
"/usr/lib/opensc-pkcs11.so" \
@lrvick
lrvick / decode_punchcard.py
Last active August 11, 2017 08:48
Quick and dirty punch card decoder I wrote for a CTF challenge
#!/bin/python3
import cv2
class PunchCard(object):
def __init__(self, x_offset=131, y_offset=141, y_scale=52, x_scale=153):
self.x_offset = x_offset
self.y_offset = y_offset
self.x_scale = x_scale
self.y_scale = y_scale
#include "ergodox_ez.h"
#include "debug.h"
#include "action_layer.h"
#include "version.h"
#include "keymap_german.h"
#include "keymap_nordic.h"
@lrvick
lrvick / aws_config
Last active April 22, 2018 11:27
Use AWS CLI transparently with TOTP and IAM accounts.
[default]
region = us-west-2
output = json
[profile example]
role_session_name = example
mfa_serial = arn:aws:iam::567582265868:mfa/example
credential_process = bash -c "~/.aws/aws-mfa.sh example path/to/credentials.gpg"
@lrvick
lrvick / ansible_deploy.yml
Last active April 28, 2022 22:18
Bootstrap Ansible-Pull systemd automation with GPG verification
---
- hosts:
tasks:
- apt:
update_cache: true
name: ansible
state: present
- name: Install trusted author PGP keys
reverted:
--- b/aliases
+++ a/aliases
@@ -1,2 +1,3 @@
# See man 5 aliases for format
postmaster: root
+root: [email protected]
reverted:
--- b/apparmor.d/abstractions/tor
+++ a/apparmor.d/abstractions/tor
@lrvick
lrvick / .plan
Last active June 15, 2018 01:36
Plan
## Projects
* Win a black badge at defcon
* place in a FPV quadcopter race
* Troll router that spams endless hotspot names
* markdown to json blog engine overhaul for rant
* varnish/jsdom proxy
* auto screen locking with BLE/HID module
* migrate all personal services to terraform/kubernetes
* 3D code data wallpaper generator
@lrvick
lrvick / main.yml
Created May 9, 2018 18:04
Ansible pattern for multi-os configuration
---
- hosts: all
become: yes
become_user: "{{ lookup('env','SUDO_USER') }}"
tasks:
- name: Display OS Details
block:
- debug:
var: ansible_distribution
verbosity: 1