Skip to content

Instantly share code, notes, and snippets.

View josh-works's full-sized avatar

Josh Thompson josh-works

View GitHub Profile
@siraben
siraben / autocollect.sh
Last active February 9, 2021 18:59
macOS script to collect and dedup MAC addresses from a network
#!/bin/bash
# SPDX-License-Identifier: MIT
# SPDX-FileCopyrightText: 2018 Ben Siraphob <bensiraphob@gmail.com>
command -v gshuf >/dev/null 2>&1 || { echo >&2 "gshuf is required but is not installed. Run \"brew install coreutils\"."; control_c; }
command -v spoof-mac >/dev/null 2>&1 || { echo >&2 "spoof-mac is required but is not installed. Run \"brew install spoof-mac\"."; control_c; }
# Colors
RED='\033[0;31m'
NC='\033[0m'
@josh-works
josh-works / process-over-everything.md
Last active April 14, 2022 01:35
Process & Workflow for solving programming challenges, Turing

"Process" is greater than everything

Having a good process is how you go about doing anything that takes a long time and is hard. A good process can be a faithful tool to help you learn dozens of things, now, and five years from now. It's flexible and it's powerful.

One of the biggest pieces of "having a good process" is "taking plentiful notes, easily and quickly"


I won't try to convince you. Here's Arique, currently in Mod 1, on how she's made use of this general process:

@bertoort
bertoort / standards_for_developers.md
Created April 30, 2020 17:26
What makes a senior software engineer?

| Standard | Junior | Mid | Senior

@devonzuegel
devonzuegel / close-zoom-tab-on-success.js
Last active November 13, 2021 19:49
Close Zoom tab on success — TamperMonkey
/* This has moved to:
* https://github.com/devonzuegel/digital-nesting/blob/master/zoom/zoom.js
*/
@cmod
cmod / hugofastsearch.md
Last active March 22, 2024 07:02 — forked from eddiewebb/readme.md
Fast, instant client side search for Hugo static site generator

Super fast, keyboard-optimized, client side Hugo search

This is a fork of and builds upon the work of Eddie Webb's search and Matthew Daly's search explorations.

It's built for the Hugo static site generator, but could be adopted to function with any json index compatible with Fuse fuzzy search library.

To see it in action, go to craigmod.com and press CMD-/ and start typing.

Fast Search

@fernandoaleman
fernandoaleman / mysql2-mojave.md
Last active February 7, 2024 19:19
Install mysql2 on MacOS Mojave

For MacOS Catalina, visit Install mysql2 on MacOS Catalina

Problem

Installing mysql2 gem errors on MacOS Mojave.

Solution

Make sure openssl is installed on Mac via Homebrew.

@bcnzer
bcnzer / postman-pre-request.js
Last active April 23, 2024 19:26
Postman pre-request script to automatically get a bearer token from Auth0 and save it for reuse
const echoPostRequest = {
url: 'https://<my url>.auth0.com/oauth/token',
method: 'POST',
header: 'Content-Type:application/json',
body: {
mode: 'application/json',
raw: JSON.stringify(
{
client_id:'<your client ID>',
client_secret:'<your client secret>',
@BryanSchuetz
BryanSchuetz / cachebust.rb
Created February 17, 2018 16:19
CSS Cache Bust Jekyll Plugin
module Jekyll
module CacheBust
class CacheDigester
require 'digest/md5'
attr_accessor :file_name, :directory
def initialize(file_name:, directory: nil)
self.file_name = file_name
self.directory = directory
@qntmpkts
qntmpkts / .bashrc
Last active October 13, 2023 20:14
For use on ChromeOS with zsh and oh-my-zsh installed
# /etc/skel/.bashrc
if [[ $- != *i* ]] ; then
# Shell is non-interactive. Be done now!
return
fi
exec /usr/local/bin/zsh
@levelsio
levelsio / btc-eth-dca-buy.php
Last active January 6, 2023 22:04
This script runs daily and "Dollar Cost Average"-buys $40 BTC and $10 ETH per day
<?
//
// [ BUY BTC & ETH DAILY ON BITSTAMP ]
// by @levelsio
//
// 2017-08-23
//
// 1) buy $40/day BTC
// 2) buy $10/day ETH
//