Skip to content

Instantly share code, notes, and snippets.

View joebobmiles's full-sized avatar

Joseph R Miles joebobmiles

View GitHub Profile
@joebobmiles
joebobmiles / gist:d849c964cf7db89e738e840b00189aad
Created July 14, 2023 01:52
Cloudflare DDNS Shell Script
#!/usr/bin/env bash
set -o errexit
set -o nounset
set -o pipefail
# Automatically update your CloudFlare DNS record to the IP, Dynamic DNS
# Can retrieve cloudflare Domain id and list zone's, because, lazy
# Place at:
# curl https://raw.githubusercontent.com/yulewang/cloudflare-api-v4-ddns/master/cf-v4-ddns.sh > /usr/local/bin/cf-ddns.sh && chmod +x /usr/local/bin/cf-ddns.sh
@joebobmiles
joebobmiles / check_online.js
Last active August 31, 2022 17:35
Check that a Page is Online
/*
For reactive applications, IS_ONLINE could be replaced with a set() call that
alters the store.
*/
let IS_ONLINE = false;
const checkOnlineStatus = async () => {
if (!navigator.onLine) return false;
else {
try {
@joebobmiles
joebobmiles / 2021-07-16T17_41_53_814Z-debug.log
Created July 16, 2021 17:47
Log for NPM trying to install non-existant package from GPR (with NPM v7.20.0)
0 verbose cli [
0 verbose cli '/opt/hostedtoolcache/node/15.14.0/x64/bin/node',
0 verbose cli '/opt/hostedtoolcache/node/15.14.0/x64/bin/npm',
0 verbose cli 'ci',
0 verbose cli '--scope=@joebobmiles',
0 verbose cli '--registry=https://registry.npmjs.org'
0 verbose cli ]
1 info using npm@7.20.0
2 info using node@v15.14.0
3 timing npm:load:whichnode Completed in 0ms
{
"basics": {
"name": "Joseph R Miles",
"label": "Your friendly neighborhood hacker.",
"email": "joe@jrm.dev",
"phone": "(360) 710-3850",
"website": "https://jrm.dev",
"summary": "I am a hacker and maker building an accessible, usable, and beautiful future.",
"location": {
"address": "1297 North East Mount Lacrosse Lane Apartment N201",
Python 1 hr 4 mins ████████████████████▎ 96.9%
HTML 1 min ▌░░░░░░░░░░░░░░░░░░░░ 2.7%
YAML 0 secs ░░░░░░░░░░░░░░░░░░░░░ 0.3%
Other 0 secs ░░░░░░░░░░░░░░░░░░░░░ 0.1%
Git Config 0 secs ░░░░░░░░░░░░░░░░░░░░░ 0.1%
@joebobmiles
joebobmiles / tslint.json
Created November 3, 2019 02:07
Personal TSLint config. This gets rid of TSLint's hollering about minutiae that I personally think makes my code more readable.
{
"extends": "tslint:recommended",
"rules": {
"max-line-length": {
"options": [120]
},
"new-parens": true,
"no-arg": true,
"no-bitwise": false,
"no-conditional-assignment": true,
@joebobmiles
joebobmiles / tsconfig.json
Created November 3, 2019 02:03
Basic project configs for a TypeScript and WebPack project. (Requires TypeScript, WebPack, and WebPack CLI to be installed!)
{
"compilerOptions": {
"outDir": "./dist/",
"rootDir": "./src/",
"sourceMap": true,
"noImplicitAny": true,
"module": "commonjs",
"target": "es5"
}
}
@joebobmiles
joebobmiles / rsync_auto_false.log
Created July 7, 2018 14:23
The first file is the output of `vagrant reload --debug` when `rsync__auto` is set to false. The second file is the output of `vagrant reload --debug` when `rsync__auto` is set to true. In both logs, the `rsync__auto` and `auto` are shown to have been parsed correctly, but Vagrant still runs `rsync` anyways.
INFO global: Vagrant version: 2.0.2
INFO global: Ruby version: 2.5.1
INFO global: RubyGems version: 2.7.6
INFO global: VAGRANT_DETECTED_OS="Linux"
INFO global: VAGRANT_INSTALLER_VERSION="2"
INFO global: VAGRANT_PREFERRED_PROVIDERS="libvirt,docker"
INFO global: VAGRANT_INSTALLER_ENV="1"
INFO global: VAGRANT_INSTALLER_EMBEDDED_DIR="/usr/share/vagrant"
INFO global: VAGRANT_EXECUTABLE="/usr/share/vagrant/gems/bin/vagrant"
INFO global: VAGRANT_LOG="debug"