Skip to content

Instantly share code, notes, and snippets.

View bertbalcaen's full-sized avatar

Bert Balcaen bertbalcaen

View GitHub Profile
@bertbalcaen
bertbalcaen / ellipseMode.sublime-snippet
Created November 5, 2012 15:51
Sublime Text snippet for Processing's ellipseMode().
<!-- ellipseMode is missing in the Processing Sublime Text package. This is an example of how a missing function can be added. This file should be saved inside Packages/User/Processing. See http://web-design-weekly.com/2012/07/03/snippets-in-sublime-text-2/ for more info -->
<snippet>
<content><![CDATA[
ellipseMode(${1:CENTER})
]]></content>
<!-- Snippet will be triggerd by entering em followed by hitting tab. -->
<tabTrigger>em</tabTrigger>
<!-- Make sure trigger only works when Processing code. For example, in HTML we want to use em for triggering an <em> tag. -->
<scope>source.pde</scope>
</snippet>
@bertbalcaen
bertbalcaen / 131112_1113_32.csv
Created November 13, 2012 08:47
Quick an dirty way to visualize Antimap data on a map.
We can't make this file beautiful and searchable because it's too large.
41.403579,2.178496,360,0.00,0.01,29,
41.403579,2.178496,344,0.00,0.01,63,
41.403579,2.178496,344,0.00,0.01,96,
41.403579,2.178496,344,0.00,0.01,129,
41.403579,2.178496,344,0.00,0.01,163,
41.403579,2.178496,343,0.00,0.01,197,
41.403579,2.178496,333,0.00,0.01,229,
41.403579,2.178496,331,0.00,0.01,263,
41.403579,2.178496,331,0.00,0.01,296,
41.403579,2.178496,328,0.00,0.01,329,
@bertbalcaen
bertbalcaen / processing_saveframe_to_video.sh
Created November 17, 2012 11:10
Make video from images output by Processing with saveFrame("screenshot-######.png")
ffmpeg -i screenshot-00%4d.png -vcodec libx264 test.avi
@bertbalcaen
bertbalcaen / gist:4101470
Created November 17, 2012 23:35
Search for landmarks on foursquare
https://api.foursquare.com/v2/venues/search?ll=41.403557,2.178634&radius=10000&categoryId= 4bf58dd8d48988d12d941735
https://developer.foursquare.com/docs/explore#req=venues/search%3Fll%3D41.403557,2.178634%26radius%3D10000%26categoryId%3D+4bf58dd8d48988d12d941735
@bertbalcaen
bertbalcaen / gist:4102333
Created November 18, 2012 01:08
Show a static Google Map without any text labels
http://maps.googleapis.com/maps/api/staticmap?center=41.413768,2.178590&zoom=16&size=500x500&style=feature:all%7Celement:labels%7Cvisibility:off&sensor=false
@bertbalcaen
bertbalcaen / gist:4525259
Created January 13, 2013 17:42
Get all restaurants in Barcelona from OpenStreetMap
http://open.mapquestapi.com/xapi/api/0.6/node[amenity=restaurant][bbox=2.043847189714302,41.33602228834656,2.3185053928283366,41.451921575628575]
@bertbalcaen
bertbalcaen / gist:4575660
Last active December 11, 2015 08:48
OpenStreetMap data to PostGis from homebrew
osm2pgsql bcn.osm -d "osm-bcn" -l -s -p osm -H /tmp/
@bertbalcaen
bertbalcaen / gist:4612411
Created January 23, 2013 20:08
Link to find info about scheduled departures at a station
https://maps.google.be/maps/place?q=type:transit_station:%22Gorg%22&ftid=0x12a4bb68105c6521:0x8e1472e51c2f884f
@bertbalcaen
bertbalcaen / close to the body
Last active December 15, 2015 05:08
Control 6 motors with an accelerometer
// 3, 5, 6, 9, 10, and 11
#define MOTOR1 3
#define MOTOR2 5
#define MOTOR3 6
#define MOTOR4 9
#define MOTOR5 10
#define MOTOR6 11
#define PIN_X A0
#define PIN_Y A1
@bertbalcaen
bertbalcaen / Extract all frames from a 24 fps movie using ffmpeg
Last active April 6, 2021 09:02
Extract all frames from a 24 fps movie using ffmpeg
ffmpeg -i shame-run.mov -r 24/1 test/output%03d.jpg