Skip to content

Instantly share code, notes, and snippets.

View andrewmcodes's full-sized avatar
🌱

Andrew Mason andrewmcodes

🌱
View GitHub Profile
@andrewmcodes
andrewmcodes / iOS Shortcuts Catalog.md
Created June 11, 2021 21:47 — forked from brucebentley/iOS Shortcuts Catalog.md
This is a public resource designed to help people get started with Siri Shortcuts & the Shortcuts app. It’s made up of the Shortcuts Library, a collection of over 125+ shortcuts grouped into folders, and the Action Directory, a documentation of 125+ of the actions in the Shortcuts app used to build shortcuts.

Bruce's iOS Shortcut Catalog

Hello and welcome to my Shortcuts Catalog!

This is a public resource designed to help people get started with Siri Shortcuts and the Shortcuts app.

It’s made up of the Shortcuts Library, a collection of over 125+ shortcuts grouped into folders, and the Action Directory, a documentation of 125+ of the actions in the Shortcuts app used to build shortcuts.

Enjoy!

@andrewmcodes
andrewmcodes / good_job.sh
Created November 22, 2023 14:01
Add comment to random Ruby file
#! /usr/bin/env zsh
file=$(fd -e rb -H -1 | shuf -n 1)
line=$(shuf -i 1-$(($(wc -l < "$file") + 1)) -n 1)
awk -v line="$line" 'NR==line{$0="# GOOD_JOB: YOU PROBABLY FORGOT TO REMOVE THIS COMMENT DIDNT YOU\n"$0}1' "$file" > temp && mv temp "$file"
@andrewmcodes
andrewmcodes / index.html
Created September 21, 2023 03:22
alksjd
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="x-ua-compatible" content="ie=edge" />
<title></title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="styles/common.css" />
<link rel="stylesheet" href="styles/playlist.css" />
</head>
@andrewmcodes
andrewmcodes / index.html
Created September 21, 2023 03:21
john dodooo
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="x-ua-compatible" content="ie=edge" />
<title></title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="styles/common.css" />
<link rel="stylesheet" href="styles/playlist.css" />
</head>
@andrewmcodes
andrewmcodes / GemPluginImport.js
Last active May 22, 2023 21:19
RubyGems QuickAdd Marcro for Obsidian
const notice = (msg) => new Notice(msg, 5000);
const log = (msg) => console.log(msg);
const RUBYGEMS_API_URL = "https://rubygems.org/api/v1/gems/";
let QuickAdd;
module.exports = async function start(params) {
QuickAdd = params;
@andrewmcodes
andrewmcodes / dragon.txt
Created May 5, 2023 20:36
ASCII of a Dragon from Podia's codebase, originally added by @ideasasylum
. _///_,
. / ` ' '>
) o' __/_'>
( / _/ )_\'>
' "__/ /_/\_>
____/_/_/_/
/,---, _/ /
"" /_/_/_/
/_(_(_(_ \
( \_\_\\_ )\
[{"nldates-obsidian":{"id":"nldates-obsidian","name":"Natural Language Dates","author":"Argentina Ortega Sainz","description":"Create date-links based on natural language.","repo_url":"https://github.com/argenos/nldates-obsidian","marketplace_url":"obsidian://show-plugin?id=nldates-obsidian"}},{"hotkeysplus-obsidian":{"id":"hotkeysplus-obsidian","name":"Hotkeys++","author":"Argentina Ortega Sainz","description":"Additional hotkeys to do common things in Obsidian.","repo_url":"https://github.com/argenos/hotkeysplus-obsidian","marketplace_url":"obsidian://show-plugin?id=hotkeysplus-obsidian"}},{"obsidian-git":{"id":"obsidian-git","name":"Obsidian Git","author":"Vinzent, (Denis Olehov)","description":"Backup your vault with Git","repo_url":"https://github.com/denolehov/obsidian-git","marketplace_url":"obsidian://show-plugin?id=obsidian-git"}},{"url-into-selection":{"id":"url-into-selection","name":"Paste URL into selection","author":"Denis Olehov","description":"Paste URL \"into\" selected text.","repo_url":"htt
@andrewmcodes
andrewmcodes / highlightBrowserElements.js
Created March 29, 2023 14:56
Paste this into the console to highlight all the elements.
$$('*').forEach(el => el.style.outline=`1px solid hsl(${ el.tagName.split('').reduce((sum, c)=> sum+=c.charCodeAt(0), 0) % 360 },99%,50%)`)
@andrewmcodes
andrewmcodes / flipper.rb
Created November 29, 2022 18:47
Flipper UI Banner in Production
Flipper::UI.configure do |config|
config.banner_text = "Production Environment" if Rails.env.production?
end
@andrewmcodes
andrewmcodes / box_component.rb
Created September 23, 2022 22:08
Example showing how to use `as` option in ViewComponent
class BoxComponent < ViewComponent::Base
DEFAULT_TAG = :div
def initialize(**opts)
@opts = opts
@tag_opts = opts.except(:as, :classes)
end
def call
tag.send tag_name, content, class: classes, **tag_opts