Skip to content

Instantly share code, notes, and snippets.

View derekaug's full-sized avatar
🐢
festina lente

Derek J. Augustine derekaug

🐢
festina lente
View GitHub Profile
@derekaug
derekaug / housekeeping-bookmarklet.txt
Last active April 1, 2022 16:40
Github Notifications Housekeeping Bookmarklet
javascript:%22use%20strict%22;void%20function(){document.querySelectorAll(%22.notifications-list-item%22).forEach(function(a){0%3CArray.from(a.querySelectorAll(%22.octicon-git-merge%22)).length%26%26a.querySelector(%22[type=\%22checkbox\%22]%22).click(),0%3CArray.from(a.querySelectorAll(%22.octicon-git-pull-request-closed%22)).length%26%26a.querySelector(%22[type=\%22checkbox\%22]%22).click(),0%3CArray.from(a.querySelectorAll(%22.octicon-git-pull-request-draft%22)).length%26%26a.querySelector(%22[type=\%22checkbox\%22]%22).click(),0%3CArray.from(a.querySelectorAll(%22.octicon-issue-closed%22)).length%26%26a.querySelector(%22[type=\%22checkbox\%22]%22).click()})}();
@derekaug
derekaug / click-all-merged.js
Last active October 22, 2020 12:41
Bookmarklet: Github Notifications - Click All Merged
javascript:(function(){document.querySelectorAll(".notifications-list-item").forEach(function(a){0<Array.from(a.querySelectorAll(".octicon-git-merge")).length&&a.querySelector('[type="checkbox"]').click()})})();
{"lastUpload":"2020-09-11T14:46:05.805Z","extensionVersion":"v3.4.3"}
@derekaug
derekaug / dnsmasq.sh
Last active August 30, 2023 19:46
DNSMasq Setup for Local Development
brew install dnsmasq
mkdir -pv $(brew --prefix)/etc/
echo "# LOCAL DEVELOPMENT HOSTS" >> $(brew --prefix)/etc/dnsmasq.conf
echo 'address=/.localhost/127.0.0.1' >> $(brew --prefix)/etc/dnsmasq.conf
echo "address=/.localhost/::1" >> $(brew --prefix)/etc/dnsmasq.conf
sudo mkdir -v /etc/resolver
sudo bash -c 'echo "nameserver 127.0.0.1" > /etc/resolver/localhost'
sudo brew services start dnsmasq
@derekaug
derekaug / Brewfile
Last active November 11, 2020 19:11
My Brewfile for new machine setup
# INITIAL
cask_args appdir: "/Applications"
tap "homebrew/cask"
tap "homebrew/cask-fonts"
tap "homebrew/cask-drivers"
tap "homebrew/bundle"
tap "homebrew/core"
tap "homebrew/services"
tap "mas-cli/tap"
brew "mas"
@derekaug
derekaug / cmd line output.txt
Created December 11, 2017 19:10
error when doing git pull from springloops.io repository
ssh_exchange_identification: read: Connection reset by peer
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
@derekaug
derekaug / New Machine Setup.md
Last active June 27, 2017 17:23
Setting up a LAMP stack / development environment on OSX

New Machine Setup

Preface

This is a living document, if I sent this your way and there's any changes you'd recommend or anything that's borked, don't hesitate to hit me up and tell me I suck at life.

Initial Setup

Set default to how all files (even hidden files) in Finder because it sucks not seeing hidden files in Finder when you know they are there:

@derekaug
derekaug / httpd.conf
Created June 27, 2017 16:48
My httpd.conf for comparison
#
# This is the main Apache HTTP server configuration file. It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/2.4/> for detailed information.
# In particular, see
# <URL:http://httpd.apache.org/docs/2.4/mod/directives.html>
# for a discussion of each configuration directive.
#
# Do NOT simply read the instructions in here without understanding
# what they do. They're here only as hints or reminders. If you are unsure
@derekaug
derekaug / httpd-vhosts.conf
Last active June 27, 2017 16:08
Base template for Apache Virtual Hosts
# Listening ports.
Listen {PORT}
# Set up permissions for VirtualHosts in ~/Sites
<Directory "/Users/{USERNAME}/Sites">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
<IfModule mod_authz_core.c>
Require all granted
</IfModule>
@derekaug
derekaug / no_widow.php
Created December 22, 2015 15:47
takes a string (expecting no html) and adds &nbsp; to it to prevent widows
<?php
/**
* replaces the last space in a block of text with a &nbsp; to help prevent widows
* @param $string
* @return string
*/
function no_widow($string)
{
$string = trim($string);