Skip to content

Instantly share code, notes, and snippets.

<?php
function 💥($🎩){
echo "👍 BOOM! - $🎩 \n";
}
💥("🙀");

Think small

Try and aim for things that you can build in a couple of evenings or an afternoon. It’s more important to get things out, than working on things that seem bigger.

Once you’ve hacked a few things together:

  1. You’ll get ideas for bigger things
  2. You’ll have the mini-project code that you can put into the next thing.

Have a place to output

@benfoxall
benfoxall / runkeeper-export.sh
Last active April 20, 2018 20:47
A bash script for exporting runkeeper data.
# Requires:
# a) `jq` to be installed
# b) A Bearer token (you can grab this from the healthgraph debug console)
export BEARER=MY_TOKEN_FROM_THE_CONSOLE
curl https://api.runkeeper.com/fitnessActivities?pageSize=100 -H "Authorization: Bearer $BEARER" > page1.json
curl https://api.runkeeper.com/fitnessActivities?pageSize=100&page=2 -H "Authorization: Bearer $BEARER" > page2.json
curl https://api.runkeeper.com/fitnessActivities?pageSize=100&page=3 -H "Authorization: Bearer $BEARER" > page3.json
function tobuffer(points){
var length = points.length;
var len = length * 4;
var buffer = new ArrayBuffer(len * 4);
var lats = new Float32Array(buffer, 0, len/4);
var lons = new Float32Array(buffer, len, len/4);
function fake(obj, keys) {
angular.forEach(keys, function(property, key) {
$http.get('http://faker.hook.io?property=' + property)
.then(function(value) {
obj[key] = JSON.parse(value.data);
});
});
}
fake($scope.player, {
var active = true;
setWatch(function(e) {
if(active){
stop = !stop;
active = false;
setTimeout(function(){
active = true;
}, 1000);
}
# STEP ONE
# dependencies
brew install ffmpeg gifsicle
# STEP 2
# create "input.mov" with Quicktime
# STEP three
# convert
ffmpeg -i input.mov -pix_fmt rgb24 -r 20 -f gif - | gifsicle --optimize=3 --delay=3 > out.gif

Next meet

[BEN]

Was “JS Media”, then “Creative JS”, now “July”.

We’ve got one, great, talk confirmed.

  • confirm other talk
  • confirm SoH overviews
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@benfoxall
benfoxall / example.js
Created March 3, 2015 20:07
jQuery in the real world
// listen to this music
$('button').click(playMusic)
// see how awesome my cat is
$('img.cat').fullScreen()
// share some art
$('canvas').on('touchmove', draw)
// I'll bring you food