Skip to content

Instantly share code, notes, and snippets.

View incanus's full-sized avatar

Justin R. Miller incanus

View GitHub Profile
This file has been truncated, but you can view the full file.
$ pod trunk push --allow-warnings --verbose
[!] Found podspec `FMDB.podspec`
CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local
because checking is only performed in repo update
Updating spec repo `trunk`
CDN: trunk Relative path: deprecated_podspecs.txt, has ETag?
W/"65c55d2c-b6ad2"
CDN: trunk Relative path not modified: deprecated_podspecs.txt
#!/bin/sh
SRC1=$HOME/Library/Safari
SRC2=$HOME/Library/Containers/com.apple.Safari/Data/Library/Safari
HOST=$( hostname | sed 's/\..*//' )
HOUR=$( date +"%H" )
DST=$HOME/Sync/Safari/$HOST/$HOUR
mkdir -p $DST 2>/dev/null
cd $SRC1
@incanus
incanus / safari_backup.sh
Created March 6, 2023 00:12
backup job I run on an hourly cron for some Safari safety
#!/bin/sh
SRC1=$HOME/Library/Safari
SRC2=$HOME/Library/Containers/com.apple.Safari/Data/Library/Safari
HOST=$( hostname | sed 's/\..*//' )
HOUR=$( date +"%H" )
DST=$HOME/Sync/Safari/$HOST/$HOUR
mkdir -p $DST 2>/dev/null
cd $SRC1
const moment = require('moment');
const raw = require('config/raw').raw;
const generatePostFilename = (timestamp, slug) => {
const postDate = moment(timestamp).format('YYYY-MM-DD');
return `content/microposts/${postDate}-${slug}/index.md`;
};
const generatePostUrl = (timestamp, slug) => {
const postDate = moment(timestamp).format('YYYY/MM/DD');
@incanus
incanus / wifitricks.md
Last active August 29, 2015 14:08
OS X wifi tricks

Two useful shortcuts for managing known wifi networks on OS X.

If you've got a modern Mac with no Ethernet, your wifi interface is en0. Otherwise, it is en1, so replace that below.

alias wifils='networksetup -listpreferredwirelessnetworks en0'

This lets you list (and possibly grep) all known, previously connected wireless networks. Just type wifils.

@incanus
incanus / aeropress.md
Last active August 29, 2015 14:02
This is how I brew coffee in an AeroPress.
  • For one regular mug / two shots, use one cup of water (bottom line) and two scoops of beans.
  • For my Peregrine mug / three shots, use 1.5 cups of water (between the two lines) and three scoops of beans.
  • For a Klean Kanteen / four shots, use two cups of water (top line) and four scoops of beans.

Make sure all the equipment is dry, or else keep the grounds in the grinder lid until right before brewing.

Setup a mug or glass with the press and filter. Put the funnel in the top.

Microwave the water on full power.

Keybase proof

I hereby claim:

  • I am incanus on github.
  • I am incanus (https://keybase.io/incanus) on keybase.
  • I have a public key whose fingerprint is 2231 DFF0 869E E3A5 885A E7D4 F787 7A2B C9C4 0C31

To claim this, I am signing this object:

Native OS X OpenStreetMap editing app

Reasoning

Prompted by:

Who wants to write a Mac-native OSM editor with me?

— Ian Dees (@iandees) February 9, 2014
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>

And a few more key followups:

#!/bin/sh
if [ -z "$1" -o -z "$2" -o -z "$3" ]; then
echo "Usage: $0 [movie file] [fps] [delay]"
exit 1
fi
DIR=/tmp/anigif-$( date +"%s" )
mkdir $DIR

Hey folks,

Here are my slides & extra info from my talk last night on Xcode from the command line.

Slides (PDF .zip):

The notification functions that I use in Bash: