Skip to content

Instantly share code, notes, and snippets.

Avatar

Stevie Howard stvhwrd

View GitHub Profile
@stvhwrd
stvhwrd / LeetCodeQuestions.md
Last active Dec 27, 2019 — forked from krishnadey30/LeetCodeQuestions.md
Curated List of Top 75 LeetCode
View LeetCodeQuestions.md
@stvhwrd
stvhwrd / curl_loop.sh
Last active Dec 21, 2019
Submit CURL requests in a loop with approximate RPS calculation
View curl_loop.sh
# Submit CURL requests in a loop with rough RPS calculation
# Example usage: `make_requests 10.0.5.28`
_call($1) {
num_requests=0;
start_time="$(date -u +%s)";
base_url="$1/entities/"
sleep_time=5
@stvhwrd
stvhwrd / curl_loop_RPS.sh
Created Nov 13, 2019
Submit CURL requests in a loop with rough RPS calculation
View curl_loop_RPS.sh
# Submit CURL requests in a loop with rough RPS calculation
run() {
num_requests=0;
start_time="$(date -u +%s)";
base_url="localhost/entities/"
while :; do
endpoint={base_url}$(date +"%S")
echo "Sending request to ${endpoint}..."
curl -s -o /dev/null -w "Response: %{http_code}\n" ${endpoint}
@stvhwrd
stvhwrd / .. Sync Settings for Sublime Text
Last active Oct 28, 2021
Sync Settings for Sublime Text 3
View .. Sync Settings for Sublime Text
https://packagecontrol.io/packages/Sync%20Settings
@stvhwrd
stvhwrd / Makefile
Created Mar 25, 2019 — forked from mpneuried/Makefile
Simple Makefile to build, run, tag and publish a docker containier to AWS-ECR
View Makefile
# import config.
# You can change the default config with `make cnf="config_special.env" build`
cnf ?= config.env
include $(cnf)
export $(shell sed 's/=.*//' $(cnf))
# import deploy config
# You can change the default deploy config with `make cnf="deploy_special.env" release`
dpl ?= deploy.env
include $(dpl)
@stvhwrd
stvhwrd / protobuf-from-source.md
Last active Nov 12, 2019 — forked from diegopacheco/latest-protobuf-ubuntu-18-04.md
How to Install Latest Protobuf on Ubuntu 18.04
View protobuf-from-source.md

Building from Source

sudo apt install autoconf automake libtool curl make g++ unzip -y
git clone https://github.com/google/protobuf.git
cd protobuf
git submodule update --init --recursive
./autogen.sh
./configure
make
View update-subdir-repos.sh
# Update
find . -type d -name .git -exec sh -c "cd \"{}\"/../ && pwd && git stash && git fetch -a && git checkout master && git pull && git stash pop" \;
@stvhwrd
stvhwrd / _README.md
Last active Mar 27, 2019
SENG 468 VM Setup Script
View _README.md

SENG 468 Lab Setup script

This is one opinionated installer script with tons of string hardcodes just to make installation quicker and easier.

What Does It Install?

Packages and Utilities

  • apt-transport-https
@stvhwrd
stvhwrd / py2registry.py
Created Dec 23, 2018
script to register Python 2.0 or later for use with Python extensions that require Python registry settings in Windows
View py2registry.py
#
# script to register Python 2.0 or later for use with
# Python extensions that require Python registry settings
#
# written by Joakim Loew for Secret Labs AB / PythonWare
#
# source:
# http://www.pythonware.com/products/works/articles/regpy20.htm
#
# modified by Valentine Gogichashvili as described in http://www.mail-archive.com/distutils-sig@python.org/msg10512.html
@stvhwrd
stvhwrd / wysiwyg.js
Created Nov 22, 2018
Turn webpage into WYSIWYG editor
View wysiwyg.js
/* Run this in console of dev tools in browser to make all text on rendered page editable (but retains style etc) */
javascript:document.body.contentEditable='true'; document.designMode='on'; void 0