Skip to content

Instantly share code, notes, and snippets.

View Peekmo's full-sized avatar

Axel Anceau Peekmo

View GitHub Profile
@karantir
karantir / index.js
Created January 26, 2019 09:09
Play sound with Howler from blob stored in IndexedDB
(function () {
// IndexedDB
var indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB || window.OIndexedDB || window.msIndexedDB,
IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction || window.OIDBTransaction || window.msIDBTransaction,
dbVersion = 2.0;
// Create/open database
var request = indexedDB.open("soundScapeFiles", dbVersion),
db,
createObjectStore = function (dataBase) {
@gopperman
gopperman / gist:18cb66078372d3261420829630230b80
Created October 27, 2017 15:13
Install postgis-2.3.2 with postgres@9.6
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/aa049a47b218fda30f9a4a454119ae067a02cf50/Formula/postgis.rb
#pg_config --pkglibdir is useful for finding your $libdir
cp -a /usr/local/share/postgresql/extension/postgis* /usr/local/Cellar/postgresql@9.6/9.6.5/share/postgresql@9.6/extension/
cp -a /usr/local/lib/postgresql/postgis-2.3.so /usr/local/Cellar/postgresql@9.6/9.6.5/lib/postgis-2.3
cp -a /usr/local/lib/postgresql/rtpostgis-2.3.so /usr/local/Cellar/postgresql@9.6/9.6.5/lib/
@mholt
mholt / interface_spider.go
Created August 4, 2014 23:04
Crawls golang.org/pkg for interfaces and writes them to a file.
package main
import (
"log"
"os"
"strings"
gq "github.com/PuerkitoBio/goquery"
)
@vladikoff
vladikoff / resource.js
Created April 17, 2014 17:52
Angular $resource and transformResponse
angular.module('itemServices', ['ngResource'])
.factory('Item', ['$resource',
function ($resource) {
return $resource('items/:id',
{id: '@id'},
{
query: {
isArray: true,
method: 'GET',
params: {},
@elliott5
elliott5 / interp.go
Last active July 28, 2017 04:02
Go Interpreter (in 35 lines) - CURRENTLY NOT WORKING
// NOT WORKING AS AT 14-JAN-14 DUE TO API CHANGES
//
// written for the Go London User Group meeting of 21st November 2013 by Elliott Stoneham
// uses code.google.com/p/go.tools/ssa/interp which warns “It is not, and will never be, a production-quality Go interpreter.”
// main() code adapted from the example given in code.google.com/p/go.tools/ssa
// requires go version 1.2
//
package main
import (
@nfreear
nfreear / csv2po.php
Last active December 3, 2020 15:21
Convert a comma-separated value CSV file to Gettext PO format (i18n, internationalization, localization, translation)
#!/usr/bin/env php
<?php
/**
* Convert a comma-separated value CSV file to Gettext PO format.
*
* @copyright Nick Freear, 2 October 2013.
*/
$path = '/Users/Nick';
$csv_file = $path . "/Downloads/iSpot SPANISH v. luis lopez-sangil - Spanish.csv";