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 / 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 / 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 / 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 / atom-language-babel-flowtype-comments-issue.js
Created October 11, 2016 02:46
sample code to trigger a weird colouring issue with the language-babel plugin for Atom
'use strict'
function looksFine () {}
function looksFineWithArgs (
first /* : string */,
second /* : number */
) /* : boolean */ {
const statementsLookGood = true
return false
@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 / 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 / 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 / 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 / extract-heredoc.php
Created August 11, 2016 03:09
quick and bad script to migrate PHP heredoc out into a separate file
<?php
/*
usage:
php extract-heredoc.php my-code-file.php
creates my-code-file.heredoc.php
assumes input file is a single <?php code block