Skip to content

Instantly share code, notes, and snippets.

View plasticine's full-sized avatar
🐧
Hello? Is this thing on?

Justin Morris plasticine

🐧
Hello? Is this thing on?
View GitHub Profile

So yesterday brought the sad news that Google Reader is being killed off. C’est la vie it seems, given it was a Google product. In my search for an alternative I rediscovered Fever and decided to see if I could run it up for free on Heroku. Onwards...

Personally I think the news about Reeder is quite sad, as I would quite happily have paid for it as a service. In fact I like RSS so much that I actually shelled out the $30 for Fever when it first came out years ago (I was also pretty massive Shaun Inman fanboy if I’m being honest).

I ended up setting Fever aside because screw having to manage self-hosting for PHP and MySQL, right?

If you’re new to Fever I recommend going and checking it out, but also reading the post in response to the Google Reader announcement by Fevers author, Shaun, for a good list of what Fever is and isn’t.

Enough jibba-jabba!

@plasticine
plasticine / slugify
Last active September 20, 2022 13:42
Slugify strings in bash with awk
#!/usr/bin/env bash
#
# Accepts an input string and slugifies it by replacing anything non-alphanumeric with a dash.
#
# Example;
#
# $ slugify "foo bar hello/world"
# > foo-bar-hello-world
#
# $ echo "foo bar hello/world" | slugify
#!/usr/bin/env bash
set -euo pipefail
plasticine() {
[[ -z ${ITS_ME:-} ]] && {
echo "MAKING A NETWORK CALL!!!"
ITS_ME=$(curl -sSL https://api.github.com/users/plasticine)
}
@plasticine
plasticine / help.makefile
Last active August 28, 2019 11:30
Automatically extract help from your Makefiles using some fully sick awk hacks
# You're looking at it! :)
help:
@makehelp < $(MAKEFILE_LIST)
.PHONY: help
steps:
- trigger: juzzy-secondary
label: ":pipeline: First Trigger"
build:
env:
PARENT_JOB_LABEL: First
PARENT_JOB_ID: "$BUILDKITE_JOB_ID"
- wait
gcob() {
local format branch branches
format="%(committerdate:relative)\\%(color:green)%(refname:short)%(color:reset)\\%(HEAD)\\%(color:yellow)%(objectname:short)%(color:reset) %(upstream:trackshort)\\%(contents:subject)"
branches=$(git for-each-ref --format="$format" --sort=-committerdate refs/heads/ | column -t -s "\\") &&
branch=$(echo "$branches" | fzf --ansi --height=15 --border) &&
git checkout $(echo "$branch" | awk '{print $4}')
}
# Foundation Target (install system runtime deps)
FROM xyz:1.0@sha256:abcd1234 AS foundation
# Runtime deps and common environment stuff here
# Build Target (install system buildtime deps)
FROM foundation AS build
# Install build-time systems deps and things here, we don’t want/need these in production
# Development Target (development toolchain)
FROM build AS development
kube_context() {
context=$(kubectl config current-context | awk '{print toupper($0)}')
colour="%K{blue}"
[[ "$context" =~ "PRODUCTION" ]] && colour="%K{red}"
echo " $colour%F{black}%B \u2388 $context %b%f%k"
}

Keybase proof

I hereby claim:

  • I am plasticine on github.
  • I am plasticine (https://keybase.io/plasticine) on keybase.
  • I have a public key ASBkwMaRziWws0mrw9MGEGIgst3UkOfxw9hiBzpfxtHEXAo

To claim this, I am signing this object:

#!/bin/sh
# /share/CE_CACHEDEV1_DATA/.qpkg/autorun/autorun-plexconnect.sh
#
# mkdir /share/CE_CACHEDEV1_DATA/.qpkg/autorun
# chmod +x /share/CE_CACHEDEV1_DATA/.qpkg/autorun/autorun-plexconnect.sh
curl -Lk https://gist.githubusercontent.com/plasticine/86e189c42ac8ec7598a8/raw/update_plex_connect.sh | bash &