Skip to content

Instantly share code, notes, and snippets.

Not sleeping

Jason Howmans nosajio

Not sleeping
View GitHub Profile
View animate-css-hover.js
$('.animated-hover').each(function(i) {
$(this).on('mouseover', function() {
.on('mouseout', function() {
nosajio /
Created Jan 24, 2018
Run this to fix the character & emoji palette in OSX high sierra.
sudo rm /System/Library/Caches/*;
sudo rm /var/folders/*/*/*/*;
nosajio /
Created Oct 14, 2017
How to make a gif animation from a video file with FFMPEG

First, save the input video as individual frames at 10 FPS:
ffmpeg -i input.mp4 -vf scale=500:-1:flags=lanczos,fps=10 frames/ffout%03d.png

Next, join the frames up again to make the gif:
ffmpeg -i ./frames/ffout%03d.png output.gif

Bonus to optimise the gif with gifsicle:
gifsicle -O3 output.gif -o output-optimized.gif


Keybase proof

I hereby claim:

  • I am nosajio on github.
  • I am nosaj ( on keybase.
  • I have a public key whose fingerprint is B2F7 BF62 9A76 E734 4FE9 8AB7 9450 AC6D 906F 6AD2

To claim this, I am signing this object:

nosajio / pathAnimateCircle.js
Created Sep 26, 2016
This little guy will output coordinates for animating svg <path>s into a percentage of a circle. Useful for pie charts and that kind of thing.
View pathAnimateCircle.js
(function() {
'use strict';
* Radial Coordinates animation
* For use with <path d="{coords}">
* Example
nosajio / _ms.scss
Created Apr 29, 2016
Modular scale stepper function, for moving up and down a modular scale.
View _ms.scss
* SCSS Modular scale function
* Will use $ms-base as the scale, and $degrees to calculate stops on the scale
* @author Jason Howmans <@jhwmns>
* @examples
* Usage example for font size:
* // Using a scale of 1.4, this will output font-size: 1.96rem;
* font-size: #{ms(2)}rem;
import csv
sourcefile = './src/origin.csv'
destinationfile = './dist/https-comments.csv'
data = []
print('Opening write file %r' % destinationfile)
with open(destinationfile, 'w') as writeFile:
writer = csv.writer(writeFile, delimiter=',')
print('Opening read file %r' % sourcefile)
with open(sourcefile, newline='') as csvfile:
disqussrc = csv.reader(csvfile, delimiter=' ', quotechar='|')
nosajio /
Created Nov 19, 2015
List number of commits by user in all projects
for i in `find . -type d -maxdepth 1`; do
echo $i;
cd $i;
git log --oneline --all --author="\(jason\)" | wc -l;
cd ~/Code;
View breaker.js
// ==================================================
// Active media query listener / breakpoint manager
// @depends: Modernizr
// ==================================================
var breaker = function( breakpoints ) {
var exec = []
, self = this;
if (typeof breakpoints !== 'object') return false;
self.test = function() {
nosajio / Unless.js
Last active Apr 29, 2016
A useful little unless function written in javascript.
View Unless.js
* Unless
* @created April 2013 by @jasonhowmans
var unless = function( condition, callback ) {
if (typeof callback === 'function') {
if (!condition) callback();
return !condition;