Skip to content

Instantly share code, notes, and snippets.

@jakebathman
jakebathman / log.md
Created January 17, 2020 17:21 — forked from mattstauffer/log.md
Introduction to GistLog

So, you might be asking yourself, what is GistLog?

GistLog is a blogging "platform" for people who want to quickly write and publish content, in Markdown, and don't want to bother with yet another platform and yet another login and yet another group hoarding their content. With GistLog, you use your pre-existing GitHub login, you store the data in your own GitHub account, and you can publish with a single click.

Using GistLog

  1. Create a public gist with a single file using Markdown. Set the gist description to be the title of your blog post
  2. Copy the gist URL, and paste it into the text box on the GistLog create page
  3. Copy your resulting URL and share it as your blog post—note that it will be in the form of https://gistlog.co/your-github-username/gist-id
  4. If you want to have your own GistLog landing page (e.g. gistlog.co/mattstauffer), [read all about it](https://gistlog.co/mattstauffer/a82db5
@jakebathman
jakebathman / get_placeholder_images.sh
Created November 19, 2019 20:20
Get three placeholder images of set sizes, with random filenames
#!/bin/sh
# Set a few variables
SIZE_M=(750 422)
SIZE_T=(1536 864)
SIZE_D=(2780 1564)
BASE="https://picsum.photos"
# Move to the download folder
cd ~/Downloads
@jakebathman
jakebathman / gist:37ad72ff16c1f3c65dfabc24bfd53b11
Created May 8, 2019 15:49
A new gist, that should get first-party notifications for comments
Just a quick test! Hopefully comments work.
@jakebathman
jakebathman / dssh.sh
Last active May 8, 2019 15:48
"SSH" into one of your running docker containers
#! /bin/bash
## Setup note:
## Add execution permissions to this file using:
## chmod u+x dssh.sh
unset options i o
opt=( $(docker ps --format '{{.Names}}' | sort | awk '{print v++,$1}') )
# Show the user a list of containers to pick from
@jakebathman
jakebathman / karabiner.json
Created March 20, 2019 14:09
Karabiner rule for double-press left shift -> caps lock
{
"description": "Double left shift to caps_lock",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "left_shift",
"modifiers": {
"optional": ["any"]
}
@jakebathman
jakebathman / giscus_62.test
Created January 2, 2019 16:55
Test for giscus bugfix (PR #62)
This is a gist to test that Giscus is working as expected.
I will comment on this using another GitHub account in about a minute.
@jakebathman
jakebathman / test_create_alarm.ts
Created December 30, 2018 02:42
Test file for createAlarm function PR for Shortcuts JS
// Only used to create the .shortcut file
const fs = require('fs');
const {
buildShortcut,
} = require('./');
const {
comment,
createAlarm,
} = require('./actions');
@jakebathman
jakebathman / search_git_diffs.md
Created November 27, 2018 16:33
Search for a string in all diffs in a repo

Search through diffs

To make case-insensitive, add -i to all grep and git log commands

Search for "Telescope" (case sensitive) in all diffs in a repo

$ git log -STelescope

Result is something like this:

## Add multi and setmulti
!commands add !multi Multi-Stream Link: http://kadgar.net/live/$(channel)
!commands add !setmulti -ul=moderator -a=!commands edit !multi Multi-Stream Link: http://kadgar.net/live/$(channel)/$(query)
# usage: !setmulti other_stream/another_stream
@jakebathman
jakebathman / .colors
Last active October 5, 2018 16:24
Terminal colors for your .aliases file (macOS)
# First are the color variables
# Second is a function that will test the colors on your machine (tested on bash and zsh on macOS)
# Some terminals/OS's have weird inconsistencies with the escape codes,
# so google will be your friend if this doesn't work quite right
#
# You can copy/paste these into your .bashrc or similar file
# Don't forget to source the file again or restart your terminal session to apply!
# Normal Colors
export Black='\033[0;30m' # Black