Skip to content

Instantly share code, notes, and snippets.

Avatar
Does it spark joy?

Brandon Him brh55

Does it spark joy?
View GitHub Profile
View script.js
(function (d, s, id) {
var js,
sjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s);
js.id = id;
js.src = "https://sdk.snapkit.com/js/v1/create.js";
sjs.parentNode.insertBefore(js, sjs);
if (
@brh55
brh55 / Notes.md
Last active Nov 8, 2019
DB Notes
View Notes.md

UI Renders List View

  • Location
    • Merchant.Thumbnail
    • Merchant.Name
    • Merchant.ID
    • Location.Name
    • Location.ID
    • Location.City
    • Location.State
    • Items.Name
@brh55
brh55 / pokedex.js
Created Sep 19, 2019
Pokedex Skills Code
View pokedex.js
const Pokedex = require('../services/pokedex');
const convert = require('convert-units');
// Add this helper method
const parseParameter = (command, text) => {
const start = text.indexOf(command);
const textStart = text.substring(start)
const parameters = textStart.split(" ");
if (parameters[1]) {
@brh55
brh55 / lambda.py
Last active Jul 27, 2019
Minimum Terraform for AWS API Gateway <-> Lambda
View lambda.py
import json
def handler(event, context):
return {
"statusCode": 200,
'headers': {'Content-Type': 'application/json'},
"body": json.dumps('Hi!')
}
@brh55
brh55 / GPB-KV.json
Last active Jan 15, 2019
Telemetry Metrics
View GPB-KV.json
{
"nodeIdStr": "dr01",
"subscriptionIdStr": "base_metrics",
"encodingPath": "Cisco-IOS-XR-wdsysmon-fd-oper:system-monitoring/cpu-utilization",
"collectionId": "3689119",
"msgTimestamp": "1547512956008",
"dataGpbkv": [
{
"timestamp": "1547512956007",
"fields": [
@brh55
brh55 / ideal.json
Last active Jan 3, 2019
Telemetry mock data
View ideal.json
{
"name": "leaf1",
"children": [
{
"name":"transmitted-packets",
"timestamp":1538521275265,
"value":1521726,
"tags":{
"node-name":"0/0/CPU0",
"subscription":"telemetrytest",
@brh55
brh55 / script.sh
Created Jan 26, 2018
Stopping New McAffee Agent in Mac
View script.sh
sudo lsof -n -i4TCP:8081 # get the process' PID
sudo launchctl list | grep 5693 # find the launchd endpoint
sudo launchctl remove com.mcafee.agent.macmn
@brh55
brh55 / wardrobe.md
Last active Dec 6, 2017
My Minimalist Closet
View wardrobe.md

My Fundamental Minimalist Closet

This is an current working draft of my minimalist wardrobe. The intent of following items will slowly be added to my wardrobe as I build it from the grounds up.

The premise of these items should meet these minimal requirements:

  • High-quality construction along while intent behind materials used
  • Versatile to be interchangeable (neutral colors: navy, grey, black, white, oatmeal)
  • Not subjected to trends or fast fashion

Sweater Drawing Board

@brh55
brh55 / nginx.conf
Created Sep 13, 2017
Docker nginx default configuration File
View nginx.conf
user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
View payload.txt
-----------------------------215622282028325
Content-Disposition: form-data; name="__EVENTTARGET"
ctl00$uxContent$ctl01$folderPageHost$uxFolderPageViewModule$uxFolderGridView$s;1$uxSummaryButton
-----------------------------215622282028325
Content-Disposition: form-data; name="__EVENTARGUMENT"
-----------------------------215622282028325
Content-Disposition: form-data; name="__LASTFOCUS"
You can’t perform that action at this time.