Skip to content

Instantly share code, notes, and snippets.

Avatar

Ryan McQuen ryanpcmcquen

View GitHub Profile
View .jsbeautifyrc
{
"all":
{
"end_with_newline": true,
"eol": "\n",
"indent_size": 2,
"indent_with_tabs": false
},
"js":
{
@ryanpcmcquen
ryanpcmcquen / # emscripten - 2020-10-16_16-33-47.txt
Created Oct 20, 2020
emscripten on macOS 10.15.7 - Homebrew build logs
View # emscripten - 2020-10-16_16-33-47.txt
Homebrew build logs for emscripten on macOS 10.15.7
Build date: 2020-10-16 16:33:47
@ryanpcmcquen
ryanpcmcquen / init.lua
Last active Jan 11, 2021
Hammerspoon config!
View init.lua
-------------------------------------------------------------------
-- Globals
-------------------------------------------------------------------
-- This controls all window animations.
hs.window.animationDuration = 0
-------------------------------------------------------------------
-- Window Layouts
-------------------------------------------------------------------
View iterators2.rs
// iterators2.rs
// In this module, you'll learn some of unique advantages that iterators can offer.
// Step 1. Complete the `capitalize_first` function to pass the first two cases.
// Step 2. Apply the `capitalize_first` function to a vector of strings.
// Ensure that it returns a vector of strings as well.
// Step 3. Apply the `capitalize_first` function again to a list.
// Try to ensure it returns a single string.
// As always, there are hints if you execute `rustlings hint iterators2`!
// I AM NOT DONE
@ryanpcmcquen
ryanpcmcquen / sequential_array.rs
Created Jul 17, 2020
Create an array with sequentially incremented items.
View sequential_array.rs
let mut a = [0; 900];
for (index, element) in a.iter_mut().enumerate() {
*element = index;
}
println!("{} {} {}", a[23], a[700], a[1]);
@ryanpcmcquen
ryanpcmcquen / bwpass
Created Mar 10, 2020
Get passwords using the Bitwarden CLI.
View bwpass
#!/usr/bin/env bash
if [ "`echo ${1} | grep -i mongo`" ]; then
PASS=$(bw get item "${1}" | jq --join-output --raw-output .login.password | jq --slurp --raw-input '@uri' --raw-output)
else
PASS=$(bw get item "${1}" | jq --join-output --raw-output .login.password)
fi
echo ${PASS}
echo ${PASS} | pbcopy
@ryanpcmcquen
ryanpcmcquen / nmcli_example.md
Created Feb 21, 2020
Example nmcli commands.
View nmcli_example.md

This will connect to SSID and prompt for the password.

nmcli dev wifi connect SSID --ask
@ryanpcmcquen
ryanpcmcquen / 3.json
Created Oct 7, 2019
Keyboardio Model 01 layers
View 3.json
{
"keymap": [
{
"keyCode": 65535,
"label": "",
"verbose": "Transparent"
},
{
"keyCode": 30,
"label": "1"
View clear_out_firefox_devices.js
window.setInterval(() => {
;[
...document.querySelectorAll(
'button.settings-button.warning-button.client-disconnect'
)
]
.pop()
.click()
window.setTimeout(() => document.querySelector('#submit-btn').click(), 300)
}, 600)
View .gitconfig
[user]
email = rpcm@linux.com
name = Ryan McQuen
[core]
autocrlf = false
eol = lf
editor = subl -w
[pull]
rebase = false