Skip to content

Instantly share code, notes, and snippets.

Avatar

Thomas Noe t3h2mas

View GitHub Profile
@t3h2mas
t3h2mas / pull-this.sh
Created Jul 26, 2020
Open the github new PR form in a browser for the current branch (mac)
View pull-this.sh
#!/bin/bash
org="$(git remote get-url origin | cut -d '/' -f 4)"
repo="$(basename $(git rev-parse --show-toplevel))"
branch="$(git rev-parse --abbrev-ref HEAD)"
open "https://github.com/${org}/${repo}/pull/new/${branch}"
@t3h2mas
t3h2mas / builder.js
Created Jun 9, 2020
JavaScript Fluent Builder w/ JSDOC3 comments
View builder.js
class Burrito {
constructor(carb, protein, salsa, cheese = null, guac = False) {
this.carb = carb;
this.protein = protein;
this.salsa = salsa;
this.cheese = cheese;
this.guac = guac;
}
/* ... the many behaviors of a burrito go here... */
@t3h2mas
t3h2mas / open.md
Created Jul 3, 2019
Open slack w/ devtools on Mac
View open.md

SLACK_DEVELOPER_MENU=true /Applications/Slack.app/Contents/MacOS/Slack

@t3h2mas
t3h2mas / express_postgress_knex.md
Created Nov 27, 2018 — forked from laurenfazah/express_postgress_knex.md
Cheat Sheet: Setting up Express with Postgres via Knex
View express_postgress_knex.md

Express & Postgres via Knex

Note: <example> is meant to denote text replaced by you (including brackets).

Setup

// global dependencies
npm install -g knex
View advent_one.ex
defmodule One do
@moduledoc """
advent of code, day 1
"""
def captcha(nums) do
split_and_indexed = Integer.to_string(nums)
|> String.graphemes
|> Enum.map(fn x -> String.to_integer(x) end)
|> Enum.with_index
split_and_indexed
@t3h2mas
t3h2mas / nmap_quick.sh
Created Sep 6, 2017
quick nmap scan of target list file; saves results to [HOSTNAME].scanq
View nmap_quick.sh
#!/bin/bash
if [[ -z "$1" ]]; then
echo "[!] usage: $0 [HOST LIST]"
exit
fi
hosts="$1"
len=$(wc -l "$hosts")
@t3h2mas
t3h2mas / HTTPoxy.sh
Last active Sep 6, 2017
send httpoxy requests to target file list
View HTTPoxy.sh
#!/bin/bash
# https://httpoxy.org/
if [ -z "$1" ]; then
echo "[!] usage $0 [TARGET HOSTS FILE]"
exit 1
fi
targets="$1"
@t3h2mas
t3h2mas / gobuster_dns.sh
Created Sep 6, 2017
use a hosts list for gobuster's DNS search
View gobuster_dns.sh
#!/bin/bash
set -e
if [[ -z "$2" ]]; then
echo "[!] usage: $0 [HOSTS FILE] [WORDS FILE] [THREADS (optional)]"
exit
fi
hosts=$1
@t3h2mas
t3h2mas / registry.sh
Created Apr 25, 2017
Deploy registry to Docker Swarm
View registry.sh
#!/bin/bash
docker service create --name registry \
-e "REGISTRY_STORAGE=s3" \
-e "REGISTRY_STORAGE_S3_REGION=[S3 REGION]" \
-e "REGISTRY_STORAGE_S3_ACCESSKEY=[ACCESS KEY]" \
-e "REGISTRY_STORAGE_S3_SECRETKEY=[SECRET KEY]" \
-e "REGISTRY_STORAGE_S3_BUCKET=[BUCKET NAME]" \
-e "REGISTRY_STORAGE_S3_ENCRYPT=true" \
--publish 5000:5000 \
View keybase.md

Keybase proof

I hereby claim:

  • I am t3h2mas on github.
  • I am t3h2mas (https://keybase.io/t3h2mas) on keybase.
  • I have a public key whose fingerprint is 1152 CA36 D83A 2473 03A7 BAF0 FFDA 1B5C E276 21CB

To claim this, I am signing this object: