Skip to content

Instantly share code, notes, and snippets.

@alisdair
alisdair / intensify.sh
Created May 21, 2019 23:44
intensifies Slack emoji creator
#!/bin/bash
# Generate a `:something-intensifies:` Slack emoji, given a reasonable image
# input. I recommend grabbing an emoji from https://emojipedia.org/
set -euo pipefail
# Number of frames of shaking
count=10
# Max pixels to move while shaking
@DarrenN
DarrenN / get-npm-package-version
Last active June 20, 2025 19:20 — forked from yvele/get-npm-package-version.sh
Extract version from package.json (NPM) using bash / shell
# Version key/value should be on his own line
PACKAGE_VERSION=$(cat package.json \
| grep version \
| head -1 \
| awk -F: '{ print $2 }' \
| sed 's/[",]//g')
echo $PACKAGE_VERSION

Angular2 + JSPM cheat sheet

First time setup

  • install jspm beta: npm install -g jspm@beta
  • set up your project: jspm init
  • install dependencies: jspm install angular2 reflect-metadata zone.js es6-shim

This will create a jspm_packages folder, and a config.js file.

Open the config.js file - this file manages options for the System.js loader - tweak it as appropriate

@deanishe
deanishe / workflow-build.py
Last active September 30, 2025 07:34
Build Alfred Workflows into .alfredworkflow (zip) files
#!/usr/bin/python
# encoding: utf-8
#
# Copyright (c) 2013 deanishe@deanishe.net.
#
# MIT Licence. See http://opensource.org/licenses/MIT
#
# Created on 2013-11-01
#
anonymous
anonymous / contains-v4-schema.json
Created November 7, 2013 17:59
{
"description": "\"contains\" hack for v4 JSON Schema. The array must contain at least one \"A\", specified by saying that if all the entries are *not* \"A\", then it fails.",
"type": "array",
"not": {
"items": {
"not": {
"enum": ["A"]
}
}
}
@brandonb927
brandonb927 / osx-for-hackers.sh
Last active March 5, 2026 10:16
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
#!/bin/sh
###
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos
###
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx