Skip to content

Instantly share code, notes, and snippets.

View JamieMason's full-sized avatar

Jamie Mason JamieMason

View GitHub Profile
@SlexAxton
SlexAxton / .zshrc
Last active June 6, 2025 19:18
My gif workflow
gifify() {
if [[ -n "$1" ]]; then
if [[ $2 == '--good' ]]; then
ffmpeg -i $1 -r 10 -vcodec png out-static-%05d.png
time convert -verbose +dither -layers Optimize -resize 600x600\> out-static*.png GIF:- | gifsicle --colors 128 --delay=5 --loop --optimize=3 --multifile - > $1.gif
rm out-static*.png
else
ffmpeg -i $1 -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > $1.gif
fi
else
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Template Compilation Integration Test</title>
<link rel="stylesheet" href="vendor/jasmine.css" />
<script src="vendor/jasmine.js"></script>
<script src="vendor/jasmine-html.js"></script>
<script src="vendor/q.js"></script>
@AMeijerNL
AMeijerNL / Base64 encode images (Mac terminal)
Created June 12, 2013 07:59
No installs required, just change the filename and you're all set! Even better: First compress / minify your images (using a tool like ImageOptim). Uncompressed .png file (200x70 pixels) outputs as 4764 characters The same file, compressed: outputs as 1749 characters! Which is only 36% of the original size!
$ openssl enc -base64 -in YOUR_FILE.png | tr -d '\n'
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active October 26, 2025 08:45
A badass list of frontend development resources I collected over time.
@vitalyfriedman
vitalyfriedman / gist:5943304
Created July 7, 2013 12:24
Resizing JPEG images in a folder (two versions).
ls *.jpg|while read i;do convert $i -strip -interlace Plane -resize "500x" -unsharp 2x0.5+0.5+0 -quality 90 `basename $i .jpg`_small.jpg; convert $i -strip -interlace Plane -resize "1000x" -unsharp 2x0.5+0.5+0 -quality 90 `basename $i .jpg`_large.jpg; done
@creationix
creationix / jsonparse.js
Last active May 10, 2024 14:36
A streaming JSON parser as an embeddable state machine.
// A streaming byte oriented JSON parser. Feed it a single byte at a time and
// it will emit complete objects as it comes across them. Whitespace within and
// between objects is ignored. This means it can parse newline delimited JSON.
function jsonMachine(emit, next) {
next = next || $value;
return $value;
function $value(byte) {
if (!byte) return;
if (byte === 0x09 || byte === 0x0a || byte === 0x0d || byte === 0x20) {
@brianmriley
brianmriley / git-pre-commit-jshint-karma-unit
Created September 18, 2013 15:40
Git Pre-Commit shell script hook that executes Grunt tasks for JSHint && Karma Unit Tests before committing. Currently setup to change the directory as first step to the dir with your Gruntfile.js. Also adds PATH to grunt executable to current shell's PATH.
#!/bin/sh
#
# Pre-commit hooks
######################################################################
# Environment Setup
# 1) Change directory to build dir so we can run grunt tasks.
# 2) Make sure path is extended to include grunt task executable
# dir, as this commit shell is executed in the git
# client's own shell; ie Tower and WebStorm have own shell path.
@rxaviers
rxaviers / gist:7360908
Last active November 2, 2025 15:48
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: πŸ˜„ :smile: πŸ˜† :laughing:
😊 :blush: πŸ˜ƒ :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
πŸ˜† :satisfied: 😁 :grin: πŸ˜‰ :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: πŸ˜€ :grinning:
πŸ˜— :kissing: πŸ˜™ :kissing_smiling_eyes: πŸ˜› :stuck_out_tongue:
@samejar
samejar / gist:7493479
Last active December 28, 2015 11:29
Velocity Europe 2013 Links

O'Reilly Velocity Conference (7)
Velocity is much more than a conference; it's become the essential training event and source of information for web professionals from companies of all sizes. Books, newsletters, industry reports, in-person and online events, and much more.

grunt-uncss (4)
grunt-uncss - A grunt task for removing unused CSS from your project builds

Welcome - SOASTA (3)
Welcome We are excited to present SOASTA mPulseUX. This is a free, at your fingertips resource for real user measurement data. The Browsers, Geography, Mobile and Patience tabs on the right hand navigation can help you answer questions such as: What are the most patient countries in the world?

Image Optimisation (2)The images below will either be a standard JPEG or a WebP image. This is determined using a server side alogrithm based on the browser agent. For

@JamieMason
JamieMason / unfollow.js.md
Last active October 11, 2025 13:53
Unfollow everyone on twitter.com

Unfollow everyone on twitter.com

By @foldleft.bsky.social, see also Unfollow everyone on bsky.app.

  1. Go to https://twitter.com/YOUR_USER_NAME/following
  2. Open the Developer Console. (COMMAND+ALT+I on Mac)
  3. Paste this into the Developer Console and run it
// Unfollow everyone on twitter.com, by Jamie Mason (https://twitter.com/fold_left)