Skip to content

Instantly share code, notes, and snippets.

View andrewmcodes's full-sized avatar
🌱

Andrew Mason andrewmcodes

🌱
View GitHub Profile
@thomasvs
thomasvs / MoveAndProcessNextFile.js
Last active April 23, 2022 21:32 — forked from TfTHacker/ArchiveAndProcessNextFile.js
Obsidian: Archive current file and then open next file in folder (Templater script)
<%*
/*
Updated: 1/22/2022
Author: TfTHacker & thomasvs
Gist: https://gist.github.com/TfTHacker & https://gist.github.com/thomasvs/343c740825407f0a84f350e4e40bedd0
Twitter: https://twitter.com/TfTHacker & https://twitter.com/thomasvs
Requirements: Templater Plugin for Obsidian
Description: This script performs the following actions:
1. Moves current file using the file explorer's move feature
2. Opens next file in current folder into the active window pane in Obsidian
@chadwcarlson
chadwcarlson / post-deploy.yaml
Last active August 10, 2022 15:43
Updating a Platform.sh integration's `target_url` to display failed activity logs
---
name: Post-deploy
on:
push:
branches-ignore:
- 'master'
env:
PLATFORMSH_CLI_TOKEN: ${{ secrets.CLI_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ACC_MIN: 0.80
@ks2211
ks2211 / Phoenix esbuild with Tailwind and Fontawesome
Last active January 31, 2024 05:08
Phoenix with esbuild, fortawesome, and tailwindcss
Phoenix esbuild with Tailwind+Fontawesome
@kepano
kepano / obsidian-web-clipper.js
Last active May 5, 2024 23:29
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/" */
@bennewton999
bennewton999 / dailyNoteTemplate.txt
Last active April 25, 2024 12:40
My current Daily Note Template in Obsidian utilizing Templater and DataView Plugins
---
creation date: <% tp.file.creation_date() %>
tags: DailyNote <% tp.file.title.split('-')[0] %>
---
modification date: <%+ tp.file.last_modified_date("dddd Do MMMM YYYY HH:mm:ss") %> // This doesn't currently work in front matter, hoping that gets fixed.
# <% tp.file.title %>
<< [[<% tp.date.now("YYYY-MM-DD", -1, tp.file.title, "YYYY-MM-DD") %>]] | [[<% tp.date.now("YYYY-MM-DD", 1, tp.file.title, "YYYY-MM-DD") %>]]>>
<?
//
// AUTO KEYWORD-BASED FOLLOWER CURATION BOT (by @levelsio)
//
// File: twitterFollowerCuratorBot.php
//
// Created: May 2021
// License: MIT
//
@matiasfha
matiasfha / createSharingImage.js
Last active May 3, 2022 22:19
createSharingImage utility function using cloudinary transformations
const createSharingImage = ({ cloudName, text }) => {
const imageTransformations = [
'w_1200',
'h_627',
'c_fill',
'q_auto',
'f_auto'
].join(',')
const textTransformations = [
'w_600',
@infews
infews / be.rb
Last active July 5, 2021 22:51
a "better" be "alias" for bundle exec, prioritizing local binstubs
#!/usr/bin/env ruby
# Smarter be for ruby projects that prioritizes local project binstubs
# - uses zsh when needed, assuming MacOS Catalina or later
# - save on your path
# - drop the .rb
# - chmod +x
# - always type `be <command>` and the right thing should happen
#
# - inspired by Justin Searls (@searls)
@brucebentley
brucebentley / iOS Shortcuts Catalog.md
Last active April 23, 2024 06:39
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!

@jbranchaud
jbranchaud / switch_pg_server_client_versions.bash
Last active July 6, 2022 17:37
Bash function for switching asdf postgres versions and stopping/starting servers
function switch_pg {
local version_to_run=$1
local currently_running_version=$(psql --no-psqlrc -t -c 'show server_version;' postgres | xargs)
# check if you're erroneously switching to the same version
if [ "$version_to_run" = "$currently_running_version" ]; then
echo "Postgres $version_to_run is already running."
return 1
fi