Skip to content

Instantly share code, notes, and snippets.

View cornfeedhobo's full-sized avatar

cornfeedhobo cornfeedhobo

View GitHub Profile
@cornfeedhobo
cornfeedhobo / polo24hr.py
Last active August 29, 2015 14:18
Polo XMR 24hr summary
#!/usr/bin/env python
import requests
from datetime import timedelta
from datetime import datetime
payload = {
'command': 'returnChartData',
'currencyPair': 'BTC_XMR',
@cornfeedhobo
cornfeedhobo / couchbase-server
Created July 9, 2015 01:16
/etc/init.d/couchbase-server
#!/bin/sh
#
# Startup / shutdown script for the couchbase server
#
# Copyright (c) 2011, Couchbase, Inc.
# All rights reserved
#
#
### BEGIN INIT INFO
# Provides: couchbase-server
@cornfeedhobo
cornfeedhobo / hashcat_phones_loop.sh
Last active November 22, 2015 04:01
Hashcat Phones
# Use this loop to account for hashcat not handling mask files
for m in $(cat wpa-phones.hcmask); do
cs1=$(echo $m | cut -d, -f1)
mask=$(echo $m | cut -d, -f2)
./hashcat-cli.bin -a 3 -m 2500 --pw-min 10 capture.hccap -1 $cs1 $mask
done
#!/bin/sh
#
# Startup / shutdown script for the sync gateway server
#
### BEGIN INIT INFO
# Provides: sync-gateway
# Required-Start: $network $local_fs
# Required-Stop:
# Should-Start: $named
# Should-Stop:
@cornfeedhobo
cornfeedhobo / rock_paper_scissor.py
Last active July 2, 2016 19:57
Rock Paper Scissor - intro to python
"""The great game of Rock Paper Scissor"""
import os
import random
def play(rounds):
"""Play game() N times and present a scoreboard when complete"""
user_score = 0
comp_score = 0
@cornfeedhobo
cornfeedhobo / test.go
Created November 19, 2016 16:18
HCL parsing strangeness
// Copyright © 2016 cornfeedhobo
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
#!/bin/bash
# bash generate random alphanumeric string
#
# bash generate random 32 character alphanumeric string (upper and lowercase) and
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
# bash generate random 32 character alphanumeric string (lowercase only)
cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1
@cornfeedhobo
cornfeedhobo / oauth2-scope.uml
Created February 22, 2017 16:47 — forked from qevo/oauth2-scope.uml
UML for OAuth2 Authorize Scope Request
@startuml
title "OAuth2 Authorize Scope Request"
actor User
entity "Service 1" as MS1
entity "Service 2" as MS2
database SSO
User -> MS1 : Login
@cornfeedhobo
cornfeedhobo / poet
Last active August 11, 2018 16:40
poet
e1b1d1904004519450c071749131d1c04540249090c11011654431f10141d1f4f0811414e53
cite about-plugin
about-plugin 'Bash My AWS'
export BASH_MY_AWS="$HOME/.bash-my-aws"
__bma_load ()
{
force=$1
if [[ -d "$BASH_MY_AWS" ]] ; then
if [[ -z $force ]] || [[ ":$PATH:" != *":$BASH_MY_AWS/bin:"* ]] ; then