Skip to content

Instantly share code, notes, and snippets.

View joshukraine's full-sized avatar
🏠
Working from home

Joshua Steele joshukraine

🏠
Working from home
View GitHub Profile
@kepano
kepano / obsidian-web-clipper.js
Last active April 29, 2024 18:24
Obsidian Web Clipper Bookmarklet to save articles and pages from the web (for Safari, Chrome, Firefox, and mobile browsers)
javascript: Promise.all([import('https://unpkg.com/turndown@6.0.0?module'), import('https://unpkg.com/@tehshrike/readability@0.2.0'), ]).then(async ([{
default: Turndown
}, {
default: Readability
}]) => {
/* Optional vault name */
const vault = "";
/* Optional folder name such as "Clippings/" */
@bradtraversy
bradtraversy / eslint_prettier_airbnb.md
Created July 19, 2019 17:54
ESLint, Prettier & Airbnb Setup

VSCode - ESLint, Prettier & Airbnb Setup

1. Install ESLint & Prettier extensions for VSCode

Optional - Set format on save and any global prettier options

2. Install Packages

npm i -D eslint prettier eslint-plugin-prettier eslint-config-prettier eslint-plugin-node eslint-config-node
@bdesham
bdesham / process.awk
Last active March 7, 2024 11:56
Takes a list of commands with timing information and displays the elapsed time for each one.
# Takes a list of commands with timing information and displays the elapsed
# time for each one.
#
# The input is expected to look like
#
# +1518804574.3228740692 colors:76> local k
# +1518804574.3228929043 colors:77> k=44
# +1518804574.3229091167 colors:77> color[${color[$k]}]=44
# +1518804574.3229229450 colors:77> k=33
# +1518804574.3229279518 colors:77> color[${color[$k]}]=33
@heroheman
heroheman / ranger-cheatsheet.md
Last active May 1, 2024 08:42
Ranger Cheatsheet

Ranger Cheatsheet

General

Shortcut Description
ranger Start Ranger
Q Quit Ranger
R Reload current directory
? Ranger Manpages / Shortcuts

Migrating static assets from Sprockets to Webpacker

Move all assets from app/assets to frontend/static:

$ mkdir frontend/static
$ mv app/assets/{images,videos} frontend/static

Then inside irb or rails c:

@pierrejoubert73
pierrejoubert73 / markdown-details-collapsible.md
Last active May 1, 2024 17:42
How to add a collapsible section in markdown.

How to add a collapsible section in markdown

1. Example

Click me

Heading

  1. Foo
  2. Bar
    • Baz
  • Qux
@ldez
ldez / gmail-github-filters.md
Last active April 3, 2024 11:53
Gmail and GitHub - Filters

Gmail and GitHub

How to filter emails from GitHub in Gmail and flag them with labels.

The labels in this document are just examples.

Pull Request

Filter Label
@mnishiguchi
mnishiguchi / rails_friendly_forwarding.md
Last active April 29, 2024 13:25
Rails, Devise - Friendly forwarding after sign in or log in
@jgrodziski
jgrodziski / docker-aliases.sh
Last active April 30, 2024 17:46
Useful Docker Aliases
############################################################################
# #
# ------- Useful Docker Aliases -------- #
# #
# # Installation : #
# copy/paste these lines into your .bashrc or .zshrc file or just #
# type the following in your current shell to try it out: #
# wget -O - https://gist.githubusercontent.com/jgrodziski/9ed4a17709baad10dbcd4530b60dfcbb/raw/d84ef1741c59e7ab07fb055a70df1830584c6c18/docker-aliases.sh | bash
# #
# # Usage: #
#!/bin/sh
# view here:
# https://i.stack.imgur.com/OK3po.png
e=$'\e['
for n in {0..7}; do
printf "${e}"'38;05;'"${n}"'m%-6s' '('"$n"') '
done