Skip to content

Instantly share code, notes, and snippets.

View redaphid's full-sized avatar
💭
Adrift, in an ocean of stars.

Aaron Herres redaphid

💭
Adrift, in an ocean of stars.
  • Loqwai
  • Drifting
View GitHub Profile
@redaphid
redaphid / .gitignore
Last active August 18, 2023 00:24
redaphid's mega .gitignore so he never forgets again
# Logs
logs
*.log
*.log*
# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
# Runtime data
pids
@redaphid
redaphid / tsconfig.json
Last active September 16, 2022 03:42
Canonical tsconfig for Redaphid's amazing projects
{
"compilerOptions": {
"jsx": "react",
/* Visit https://aka.ms/tsconfig.json to read more about this file */
/* Basic Options */
// "incremental": true, /* Enable incremental compilation */
"lib": ["es2020", "dom"],
"target": "es2020",
/* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */
"module": "es2020",
@redaphid
redaphid / .hyper.js
Created October 22, 2019 08:14
hyper-settings
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// other configs...
overlay: {
alwaysOnTop: true,
animate: true,
@redaphid
redaphid / Dockerfile
Created September 27, 2019 22:10
Visual Studio Code Go Remote Docker Environment
#-------------------------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
#-------------------------------------------------------------------------------------------------------------
FROM ubuntu:bionic
# Avoid warnings by switching to noninteractive
ENV DEBIAN_FRONTEND=noninteractive
# This Dockerfile adds a non-root 'vscode' user with sudo access. However, for Linux,
@redaphid
redaphid / find-window.sh
Created September 25, 2019 00:00
find windows by name for yabai
#!/bin/bash
eval "yabai -m query --windows | jq '.[] | {id, app} | select(.app == \"${1}\") | .id'"
@redaphid
redaphid / watch-tests.sh
Last active July 15, 2019 03:17
Much faster ginkgo watch. Because I'm procrastinating doing actual work.
#!/bin/bash
PROJECT_PATH=`pwd`
CODE_PATH=`pwd`
chsum1=""
while [[ true ]]
do
chsum2=`find $CODE_PATH -maxdepth 4 -type f -name "*.go" -exec ls -al {} \; | md5`
if [[ $chsum1 != $chsum2 ]] ; then
@redaphid
redaphid / kill-alexa-scenes.js
Created May 24, 2019 04:33
Has Alexa filled your "scenes" with multiple redundant scenes from pairing a device over and over again? Just run this script in the developer console!
//Go to:
// https://alexa.amazon.com/spa/index.html#scenes
function killEm(){
$("#connected-home-delete-button").click()
setTimeout(function(){$('.accept').click()}, 200)
setTimeout(killEm, 300)
}
killEm()
@redaphid
redaphid / keybindings.json
Created May 15, 2019 01:38
vscode let me pick when to autocomplete!
[
{
"key": "tab",
"command": "tab",
"when": "editorTextFocus && !editorReadonly && !editorTabMovesFocus"
},
{
"key": "ctrl+space",
"command": "editor.emmet.action.expandAbbreviation",
"when": "config.emmet.triggerExpansionOnTab && editorTextFocus && !editorReadonly && !editorTabMovesFocus"
@redaphid
redaphid / routes.js
Created May 10, 2019 05:49
Dreaming of the old Meshblu
const routes = [
{method: 'get ', route: '/ping',},
{method: 'get ', route: '/authenticate/:uuid'},
{method: 'post ', route: '/authenticate'},
{method: 'post ', route: '/broadcasts'},
{method: 'post ', route: '/claimdevice/:uuid'},
{method: 'get ', route: '/devices'},
{method: 'post ', route: '/devices'},
{method: 'put ', route: '/devices/:uuid'},
{method: 'get ', route: '/devices/:uuid'},
@redaphid
redaphid / random-mac.sh
Created August 5, 2018 12:41
Randomize your mac address for...macs
#!/bin/sh
sudo ifconfig en0 ether $(openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//')