Skip to content

Instantly share code, notes, and snippets.

Avatar

Ryan McQuen ryanpcmcquen

View GitHub Profile
@ryanpcmcquen
ryanpcmcquen / index.html
Created Jun 11, 2021
Get all CSS colors as a HashMap directly from W3.
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>repl.it</title>
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<script src="script.js"></script>
@ryanpcmcquen
ryanpcmcquen / config
Created May 12, 2021
Obsidian config
View config
{"baseFontSize":16,"pluginEnabledStatus":{"file-explorer":true,"global-search":true,"switcher":true,"graph":true,"backlink":true,"page-preview":true,"command-palette":true,"markdown-importer":true,"word-count":true,"open-with-default-app":true,"file-recovery":true},"theme":"moonstone","foldHeading":true,"foldIndent":true,"useTab":false,"enabledPlugins":["obsidian-focus-mode","obsidian-org-mode"]}
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
Last active Sep 22, 2021
Keyboardio Model 01 layers
View 3.json
{
"keymap": [
{
"keyCode": 65535,
"label": "",
"verbose": "Transparent"
},
{
"keyCode": 30,
"label": "1"