Skip to content

Instantly share code, notes, and snippets.

View jokeyrhyme's full-sized avatar

Ron Waldon-Howe jokeyrhyme

View GitHub Profile
@jokeyrhyme
jokeyrhyme / gist:a0987cbbabd6b244d636279cdac22b67
Created December 11, 2021 18:46
cargo install paru (1.9.2) compile error
Installing paru v1.9.2
Downloading crates ...
Downloaded pkg-config v0.3.24
Compiling libc v0.2.109
Compiling proc-macro2 v1.0.33
Compiling unicode-xid v0.2.2
Compiling syn v1.0.82
Compiling cfg-if v1.0.0
Compiling autocfg v1.0.1
Compiling memchr v2.4.1
@jokeyrhyme
jokeyrhyme / docker-npm.js
Created August 30, 2016 00:51
execute `npm` within a Docker container, within the host's working directory
'use strict'
// ideal for use with AWS Lambda and native Node.js modules
// requires Docker: https://docs.docker.com/engine/installation/
/*
Usage:
node docker-npm.js install
node docker-npm.js rebuild
@jokeyrhyme
jokeyrhyme / wait-for.js
Last active June 29, 2019 08:38
JavaScript polling
/**
* @param {Function} condition a function that returns `true` or `false`
* @param {Number} [interval=197] the amount of time to wait between tests
* @param {Function} callback a function to invoke when the condition returns `true`
*/
function waitFor(condition, interval, callback) {
'use strict';
if (condition && condition()) {
callback();
} else {
@jokeyrhyme
jokeyrhyme / macos-keychain-research.m
Last active June 29, 2019 08:38
incomplete research for a way to delete private keys from the macOS Keychain
//
// main.m
// macos-keychain-delete-private-key
//
// Created by Ron Waldon on 2016-08-30.
// Copyright © 2016 Ron Waldon. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <Security/Security.h>
@jokeyrhyme
jokeyrhyme / load-script-once.js
Last active June 29, 2019 08:38
experimentation with a script loader that de-duplicates requests for scripts
/**
load this prior to to all other scripts on the page,
then it will be able to monitor script loading properly
requires: Promise, MutationObserver, querySelectorAll, Map, Set, const, let
*/
;(() => {
'use strict'
@jokeyrhyme
jokeyrhyme / forty-five-serverless-handlers.js
Last active June 29, 2019 08:38
stress-test script to add 45 AWS APIG routes and 500 AWS Lambda functions via Serverless: https://serverless.com/
'use strict'
const fs = require('fs')
const path = require('path')
const padStart = require('lodash.padstart')
const yaml = require('js-yaml')
const PROJECT_PATH = path.join(__dirname, '..')
const SERVERLESS_PATH = path.join(PROJECT_PATH, 'serverless.yml')
@jokeyrhyme
jokeyrhyme / Update.psm1
Last active June 29, 2019 08:37
experiments in keeping my Windows environment sync'ed and updated across multiple boxes
# as Administrator
Set-ExecutionPolicy AllSigned
Install-Module PackageManagement -AllowClobber -Force
Install-PackageProvider chocolatey
Install-Module -Name ChocolateyGet
Install-Package -Name golang
Install-Package -Name nodejs
@jokeyrhyme
jokeyrhyme / Highest Of Each Species.lua
Last active November 13, 2018 20:16
WoW: Rematch addon: Scripts
if unique then
return true
end
same = {}
for p in AllPetIDs() do
s, _, l, x = C_PetJournal.GetPetInfoByPetID(p)
if s == speciesID then
if l > level and x >= xp then
table.insert(same, 1, p)
@jokeyrhyme
jokeyrhyme / detect-ionic-deploy.js
Last active November 11, 2016 04:53
detect-ionic-deploy.js
// accurate _after_ Cordova's "deviceready" event
function isIonicDeployPath (
appId /* : string */,
global /* : Window | Global */
) /* : Promise<boolean> */ {
'use strict'
if (!global.IonicDeploy || !global.IonicDeploy.info) {
return Promise.resolve(false)
}
@jokeyrhyme
jokeyrhyme / index.html
Last active November 10, 2016 04:49
ionic-deploy-plugin useCheckResponse
<!DOCTYPE html>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at