Skip to content

Instantly share code, notes, and snippets.

View jsscclr's full-sized avatar
🐈

Jessica Claire Edwards jsscclr

🐈
  • Sydney, Australia
View GitHub Profile
@jsscclr
jsscclr / ffmpeg_cheat_sheet.sh
Created May 14, 2016 09:25 — forked from indefinit/ffmpeg_cheat_sheet.sh
A working cheat sheet for ffmpeg
#use case: converting image sequence to .mp4 video
#official documentation: https://trac.ffmpeg.org/wiki/Create%20a%20video%20slideshow%20from%20images
#description:
# An image sequence follows the pattern, defaultCanvas0-000000000.png (9 zeros)
# video codec is libx264
# pixel format yuv420p
# output file is named out.mp4
ffmpeg -i 'defaultCanvas0-%9d.png' -c:v libx264 -pix_fmt yuv420p out.mp4
#if you want your image sequence to start on a different number than index 0, use the -start_number parameter
@jsscclr
jsscclr / randomcoords.cpp
Created May 14, 2016 08:48 — forked from bengfarrell/randomcoords.cpp
Random Coordinates C++ Node.JS AddOn
#include <node.h>
#include <v8.h>
#include <stdio.h>
#include <stdlib.h>
using namespace v8;
Handle<Value> getRandomCoords2D(const Arguments& args) {
HandleScope scope;
@jsscclr
jsscclr / sort.rb
Created December 16, 2015 10:31 — forked from aspyct/sort.rb
Sample implementation of quicksort, mergesort and binary search in ruby
# Sample implementation of quicksort and mergesort in ruby
# Both algorithm sort in O(n * lg(n)) time
# Quicksort works inplace, where mergesort works in a new array
def quicksort(array, from=0, to=nil)
if to == nil
# Sort the whole array, by default
to = array.count - 1
end
@jsscclr
jsscclr / australian-postcodes.sql
Created October 21, 2015 00:54 — forked from randomecho/australian-postcodes.sql
Australian postcodes (with states and suburb names) geocoded with latitude and longitude.
/*
Taken and cribbed from blog.datalicious.com/free-download-all-australian-postcodes-geocod
May contain errors where latitude and longitude are off. Use at own non-validated risk.
*/
SET NAMES utf8;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
DROP TABLE IF EXISTS postcodes_geo;