Skip to content

Instantly share code, notes, and snippets.

View Blumed's full-sized avatar

Cullan Blumed

View GitHub Profile
@caseywatts
caseywatts / tweet-the-toot.js
Last active May 2, 2024 06:05
Toot to Twitter Bookmarklet
javascript: (function () {
const tootContents = encodeURIComponent(
document
.getElementsByClassName("detailed-status")[0]
.getElementsByClassName("status__content__text")[0].innerText
);
const twitterLink = `https://twitter.com/intent/tweet?text=${tootContents}`;
window.location.href = twitterLink;
})();
@caseywatts
caseywatts / README.md
Last active April 4, 2023 20:23
Quick Links to DMs

So many messaging apps!! It's hard to keep track of who I talk to where!

I message Brian on Signal, Sean on Discord, and Steve by sms.

I just want to type their name and BAM immediately be in the correct app.

This takes two steps:

  1. Coming up with the "weird links" to open the right app to the right person (I use a spreadsheet)
  2. Making those "weird links" easy to open (like with Apple Shortcuts)
@tomhicks
tomhicks / plink-plonk.js
Last active November 12, 2024 19:08
Listen to your web pages
@gangsthub
gangsthub / README.md
Last active September 11, 2024 19:28
DeepClone-js: JS utility with circular replacer

DeepClone-js

Utility to clean up circular references while creating a new reference of an object performing a deep copy (as oposite to a shallow copy). Bear in mind it doesn't work with some data types: Date, Map, RegExp, Set, TypedArray...

📦 Install

npm i -S gist:0bce1161cfd2aa91ae7cad9abb42c342
@swyxio
swyxio / Gatsby-bootstrap-lifecycle.md
Last active April 1, 2022 11:19
Gatsby bootstrap lifecycle

Sequence of Gatsby's bootstrap lifecycle with links to source code as of v2.0.0

  1. open and validate gatsby-config (get-config-file.js) 1.5 load themes (swyx added this note July 2019)
  2. load plugins (load-plugins/index.js) from the list given in gatsby-config.js
  3. onPreBootstrap: runs onPreBootstrap if it is implemented in any plugins, for example gatsby-plugin-typography. Receives handy [apiCallArgs](https://github.com/gatsbyjs/gatsby/blob/ffd8b2d691c9
@JeffreyWay
JeffreyWay / .bash_profile
Created July 31, 2015 19:20
Prettier git logs
alias gl="git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
@caseywatts
caseywatts / 0 - Chrome Workshop.md
Last active November 14, 2024 13:23
Chrome Extension Workshop
@paulallies
paulallies / gist:0052fab554b14bbfa3ef
Last active August 3, 2024 16:45
Remove node_modules from git repo
#add 'node_modules' to .gitignore file
git rm -r --cached node_modules
git commit -m 'Remove the now ignored directory node_modules'
git push origin <branch-name>
@jonlabelle
jonlabelle / string-utils.js
Last active July 8, 2024 21:19
Useful collection of JavaScript string utilities.
// String utils
//
// resources:
// -- mout, https://github.com/mout/mout/tree/master/src/string
/**
* "Safer" String.toLowerCase()
*/
function lowerCase(str) {
return str.toLowerCase();
@alehandrof
alehandrof / subl-scopes
Last active November 23, 2023 20:09
scopes for sublime text schemes
comment
comment punctuation
comment.block.documentation
comment.block.preprocessor
comment.documentation
constant
constant.character
constant.character punctuation
constant.character.entity
constant.character.escape