Skip to content

Instantly share code, notes, and snippets.

Sean Johnson pirogoeth

Block or report user

Report or block pirogoeth

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:2ae35f3525b7cbc5e8925548cd71bb87
# Process to add salt repo
cd to salt repo
git clone https://github.com/saltstack-formulas/openssh-formula.git openssh
cd openssh/
git config core.sparsecheckout true
echo openssh/ >> .git/info/sparse-checkout
git read-tree -mu HEAD
View state-proxy.js
const initialState = {
debug: false,
item: null,
};
function makeProxyContext(currentState, updateState) {
let cur = Object.assign({}, currentState);
let proxyState = new Proxy(updateState, {
get(_, prop, receiver) {
return cur[prop];
@pirogoeth
pirogoeth / com.github.radhifadlillah.shiori.plist
Created Mar 25, 2018
launchd plist for github.com/RadhiFadlillah/shiori
View com.github.radhifadlillah.shiori.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.github.radhifadlillah.shiori</string>
<key>Program</key>
<string>/Users/sean/.go/bin/shiori</string>
<key>ProgramArguments</key>
<array>
@pirogoeth
pirogoeth / display-modes.awk
Created Mar 6, 2018
AWK script for matching display modes from `xrandr --query`
View display-modes.awk
BEGIN {
matched = 0;
if (!display) {
print "No display variable set";
exit;
}
}
# Matches modelines
match($0, /^[[:blank:]]+/) {
View rewrite_js_imports.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
import io
import os
import re
import sys
from os import path
@pirogoeth
pirogoeth / diecast-example.py
Created Feb 7, 2018
Example usage for components with Diecast
View diecast-example.py
# -*- coding: utf-8 -*-
# this is the base test case of the DI prototype
import logging
import sys
from typing import Callable, Type
from diecast.component import Component
from diecast.inject import build_passthru_args, make_injector
from diecast.registry import get_registry, register_component
@pirogoeth
pirogoeth / result.go
Created Jul 28, 2017
I tried ¯\_(ツ)_/¯
View result.go
package main
import (
"errors"
"fmt"
"reflect"
"time"
)
type Result struct {
@pirogoeth
pirogoeth / tap.py
Created Jul 7, 2017
Python method to "tap" a config object
View tap.py
def dict_tap(path, default=None):
""" Retrieves the path through a dictionary.
"The config is a lot like an onion - it has layers"
example:
>>> dict_tap(
>>> 'otp.age_threshold',
>>> default=2,
>>> )
"""
@pirogoeth
pirogoeth / cockpit.yaml
Last active Mar 20, 2017
cockpit dev env with tmuxp and asdf
View cockpit.yaml
# Place this in ~/.tmuxp/cockpit.yaml OR in the root of your cockpit directory as .tmuxp.yaml
session_name: cockpit-dev
shell_command_before:
# Change this to pop in to your cockpit dev dir!
- cd ~/Projects/cockpit
- workon cockpit
windows:
- window_name: services
layout: main-horizontal
@pirogoeth
pirogoeth / openpgp.txt
Created Mar 11, 2016
OpenKeychain Linked Identity
View openpgp.txt
This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account.
Token for proof:
[Verifying my OpenPGP key: openpgp4fpr:fe5936df6b1fae3e0db7716e331c0128eadbd70d]
You can’t perform that action at this time.