Skip to content

Instantly share code, notes, and snippets.

View jwenerd's full-sized avatar
workin'

Jared Wenerd jwenerd

workin'
View GitHub Profile
@fernandoaleman
fernandoaleman / mysql2-m1.md
Last active July 23, 2024 05:16
How to install mysql2 gem on m1 Mac

Problem

Installing mysql2 gem errors on Apple silicon M1, M2 or M3 Mac running macOS Sonoma.

Solution

Make sure mysql-client, openssl and zstd are installed on Mac via Homebrew.

Replace mysql-client with whichever mysql package you are using

@philip-gai
philip-gai / gh-set-secret.yml
Last active January 14, 2024 18:11
GitHub Actions: Set a repo environment secret using the gh cli in 1-2 steps
# Prerequisites:
# - Create a secret with your PAT token. Permissions needed: repo (all) and read:org
# - Create the HELLO_WORLD secret in your environment with some dummy initial value
#
# Notes:
# - You can tell that it works because it masks the secret_body in the echo secret step after it creates the secret 😄
# - If you don't want to have to pass --repo to gh secret set, then put the actions/checkout@v2 step before the gh secret set step
name: gh-set-secret
@joshuabezaleel
joshuabezaleel / ennui.md
Created October 14, 2020 12:27 — forked from vilmibm/ennui.md
a plath poem

Ennui

Tea leaves thwart those who court catastrophe,
designing futures where nothing will occur:
cross the gypsy’s palm and yawning she
will still predict no perils left to conquer.
Jeopardy is jejune now: naïve knight
finds ogres out-of-date and dragons unheard
of, while blasé princesses indict

tilts at terror as downright absurd.

@vilmibm
vilmibm / ennui.md
Last active January 18, 2024 06:08
a plath poem

Ennui

Tea leaves thwart those who court catastrophe,
designing futures where nothing will occur:
cross the gypsy’s palm and yawning she
will still predict no perils left to conquer.
Jeopardy is jejune now: naïve knight
finds ogres out-of-date and dragons unheard
of, while blasé princesses indict

tilts at terror as downright absurd.

@adbutterfield
adbutterfield / prettier.config.js
Last active July 6, 2024 04:05
Default prettier config with comments and links to prettier rules
module.exports = {
/**
* Print Width
* https://prettier.io/docs/en/options.html#print-width
*
* Specify the line length that the printer will wrap on.
*
* printWidth: <int>
* default: 80
*/
@cpitt
cpitt / memoizeLocalStorage.js
Last active May 3, 2024 03:58
Memoize a function using local storage as it's cache
/**
* memoizes a function using localStorage as the cache
* @param {function|Promise} fn function or promise you wish to memoize
* @param {Object} [options] additional configuration
* @param {number} [options.ttl=0] time to live in seconds
* @param {Boolean} [options.backgroundRefresh=false] whether the cache should be refreshed asynchronously,
* Note: new results won't resolve until next execution
* @return {Promise} Promise object represents memoized result
*/
function memoizeLocalStorage(
@koshatul
koshatul / README.md
Last active July 10, 2024 09:25
use Apple Keychain to store GPG Passphrases

gpg-agent setup

Need to setup gpg-agent first, on OSX I use keychain (it also does ssh-agent)

$ brew info keychain
keychain: stable 2.8.5
User-friendly front-end to ssh-agent(1)
https://www.funtoo.org/Keychain
/usr/local/Cellar/keychain/2.8.5 (7 files, 108.5KB) *
@mrmartineau
mrmartineau / settings.json
Last active July 16, 2024 14:26
vscode settings.json
{
"[handlebars]": {
"editor.formatOnSave": false
},
"[markdown]": {
"editor.quickSuggestions": {
"comments": "off",
"other": "on",
"strings": "off"
}
@lurch
lurch / Github Flavored Markdown.md
Last active January 18, 2024 09:01 — forked from paulprogrammer/Github Flavored Markdown.md
Github Flavored Markdown cheatsheet

Github Flavored Markdown (GFMD) is based on Markdown Syntax Guide with some overwriting as described at Github Flavored Markdown

Text Writing

It is easy to write in GFMD. Just write simply like text and use the below simple "tagging" to mark the text and you are good to go!

To specify a paragraph, leave 2 spaces at the end of the line

Headings

@faressoft
faressoft / dom_performance_reflow_repaint.md
Last active July 23, 2024 08:38
DOM Performance (Reflow & Repaint) (Summary)

DOM Performance

Rendering

  • How the browser renders the document
    • Receives the data (bytes) from the server.
    • Parses and converts into tokens (<, TagName, Attribute, AttributeValue, >).
    • Turns tokens into nodes.
    • Turns nodes into the DOM tree.
  • Builds CSSOM tree from the css rules.