Skip to content

Instantly share code, notes, and snippets.

View dhbradshaw's full-sized avatar

Douglas H. Bradshaw dhbradshaw

  • Harvest Alabama
View GitHub Profile
@dhbradshaw
dhbradshaw / save-heroku-config-vars-to-env.sh
Created May 13, 2020 16:31 — forked from tibawatanabe/save-heroku-config-vars-to-env.sh
Command line to save Heroku config vars into .env file
heroku config | sed 's/: */=/g; /^=/d' >> .env
@dhbradshaw
dhbradshaw / systemd_services.md
Last active April 15, 2024 11:18 — forked from leommoore/systemd_services.md
Systemd Services 101

Check that your system supports systemd

pidof systemd
2733

If this return a number then your system supports systemd. Most Linux distributions in 2017 support systemd.

Check out the processes currently running.

Since systemd starts the process then all processes will be children of systemd

@dhbradshaw
dhbradshaw / morse.js
Last active January 6, 2021 17:09 — forked from eholk/morse.js
A Morse Code generator in Java Script
function MorseNode(ac, rate) {
// ac is an audio context.
this._oscillator = ac.createOscillator();
this._gain = ac.createGain();
this._gain.gain.value = 0;
this._oscillator.frequency.value = 750;
this._oscillator.connect(this._gain);
@dhbradshaw
dhbradshaw / hn_seach.js
Created September 2, 2016 10:50 — forked from kristopolous/hn_seach.js
hn job query search
function query() {
var
// HN is done with very unsemantic classes.
job_list = Array.prototype.slice.call(document.querySelectorAll('.c5a,.cae,.c00,.c9c,.cdd,.c73,.c88')),
query_list = Array.prototype.slice.call(arguments),
shown = 0, total = job_list.length;
// Traverses up the dom stack trying to find a match of a specific class
function up_to(node, klass) {
if (node.classList.contains(klass)) {