Skip to content

Instantly share code, notes, and snippets.

@josephwegner
josephwegner / traffic_simulation.js
Last active Oct 23, 2020
Traffic Simulation DX
View traffic_simulation.js
const sim = new Simulation({
home: '/',
login: '/login',
successfulLogin: { path: 'login', method: 'POST', body: { username: 'joe', password: 'goodpass' } },
failedLogin: { path: 'login', method: 'POST', body: { username: 'joe', password: 'badpass' } },
dash: '/dashboard',
billing: '/billing'
})
const newUser = sim.actor(5, 'New User')
View jrnl
#!/bin/bash
JRNL_DIR="/Your/Dropbox/Or/Drive/Or/Whatever/notes/day_journals/`date +%Y/%m`"
mkdir -p "$JRNL_DIR"
JRNL_FILE="$JRNL_DIR/$(date +%d).txt"
touch "$JRNL_FILE"
vim + "$JRNL_FILE"
View header.html
<!DOCTYPE html>
<html lang='en-US'>
<head>
<style>
html,body {
background: red;
}
h1 {
color: black;
}
View keybase.md

Keybase proof

I hereby claim:

  • I am josephwegner on github.
  • I am josephwegner (https://keybase.io/josephwegner) on keybase.
  • I have a public key whose fingerprint is 971F 64D6 5EF5 C424 C126 16C7 64D1 7DA8 1109 DD8A

To claim this, I am signing this object:

@josephwegner
josephwegner / README.md
Created Aug 10, 2019
Scrape /r/Hobbies comments for subreddit links
View README.md

Simple enough to run... just use the following commands

node scrape.js #creates the file subreddits.list
node count.js #outputs markdown-formatted data.

Please be respectful with this script. Pushshift is a free service, and serving these API requests costs them money.

View simpleserver.js
var http = require('http')
var server = http.createServer(function(req, res) {
res.end('OK')
});
server.listen(process.env.PORT || 3000, function() {
console.log('listening on ', process.env.PORT || 3000)
})
@josephwegner
josephwegner / userscript.user.js
Last active Dec 5, 2018
Hide Form Fill Intro
View userscript.user.js
// ==UserScript==
// @name Form Fill Intro Fixer
// @namespace http://tampermonkey.net/
// @version 0.2.1
// @description Hide the Form Fill boiler plate intro description
// @author You
// @match https://support.heroku.com/tags/*
// @match https://support.heroku.com/inbox
// @match https://support.heroku.com/search*
// @grant none
@josephwegner
josephwegner / userscript.user.js
Last active Apr 1, 2019
Self Assigned Fill Black
View userscript.user.js
// ==UserScript==
// @name Self Assigned Label Color
// @namespace http://tampermonkey.net/
// @version 0.2.1
// @description Add color to the assignee label if it is assigned to me
// @author You
// @match https://support.heroku.com/tags/*
// @match https://support.heroku.com/inbox
// @match https://support.heroku.com/search*
// @grant none
View icons.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.