Skip to content

Instantly share code, notes, and snippets.

View montchr's full-sized avatar
🎢

chris montgomery montchr

🎢
View GitHub Profile
{
"nodes": {
"agenix": {
"inputs": {
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1652747504,
"narHash": "sha256-0FnoUBia9EYeDlg/XcPf043Tl/5RneSUaZ6IMsBYreY=",
"owner": "montchr",
#!/usr/bin/php -d open_basedir=/usr/syno/bin/ddns
<?php
if ($argc !== 5) {
echo 'badparam';
exit();
}
// Entered into DSM (Control Panel > External Access > DDNS)
$username = (string) $argv[1]; // Resource ID
@montchr
montchr / ANSI.md
Created April 28, 2022 15:23 — forked from fnky/ANSI.md
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@montchr
montchr / README.md
Last active February 22, 2022 18:13
git-cliff configuration for work flows

Run the following command from any location within a repo, replacing the value of BASE_BRANCH with the base branch for your feature branch if necessary:

BASE_BRANCH="main" && git-cliff -r $(git rev-parse --show-toplevel) -- "$BASE_BRANCH..HEAD"

On macOS, you can easily copy the output of this command directly to your clipboard by piping it into pbcopy:

BASE_BRANCH="main" &amp;&amp; git-cliff -r $(git rev-parse --show-toplevel) -- "$BASE_BRANCH..HEAD" | pbcopy
@montchr
montchr / README.md
Last active February 8, 2022 18:59
BlueConic Bookmarklets

BlueConic Bookmarklets

Installation

Firefox

  1. Right-click the bookmarks bar
  2. In the URL field, paste the "Content" snippet
  3. Name the bookmark whatever you like
@montchr
montchr / bookmarklet.js
Created February 4, 2022 15:59
alternate react-query devtools toggle button visibility
javascript:(function()%7Bconst%20toggleButton%20%3D%20document.querySelector('.ReactQueryDevtools')%3Bconst%20isVisible%20%3D%20toggleButton.style.visibility%3BtoggleButton.style.visibility%20%3D%20'visible'%20%3D%3D%3D%20isVisible%20%3F%20'hidden'%20%3A%20'visible'%7D)()
@montchr
montchr / input.scss
Created January 11, 2022 18:56
Generated by SassMeister.com.
$poppins: 'Poppins';
$playfair: 'Playfair Display';
$serif: $poppins, georgia, times, serif;
$sans-serif: $playfair, helvetica, arial, sans-serif;
.serif { font-family: $serif; }
.sans-serif { font-family: $sans-serif; }
@montchr
montchr / github.css
Last active August 9, 2021 21:18
GitHub personal CSS overrides
/* alternate monospace font stack, sorted by least popular so you're most likely to get the font you want */
code,
kbd,
pre,
tt,
.ace_editor.ace-github-light,
.blame-sha,
.blob-code-inner,
.blob-num,
.branch-name,
@montchr
montchr / addToPlaylist.applescript
Created August 4, 2021 16:19
Add track to Music.app playlist
use AppleScript version "2.4" -- Yosemite (10.10) or later
use scripting additions
on addToList(theTrack, listName)
tell application "Music"
local theList, theTrackID, theListID, dupe
set theList to user playlist listName
set theTrackID to database ID of theTrack
set theListID to id of theList