Skip to content

Instantly share code, notes, and snippets.

View Meekohi's full-sized avatar

Michael Holroyd Meekohi

View GitHub Profile
@Meekohi
Meekohi / instagram_response
Created March 19, 2014 16:54
example return value of Instagram API
{
"attribution" : null,
"tags" : [
"coffeeandcookiesforbreakfast"
],
"location" : {
"latitude" : 38.03301584,
"longitude" : -78.5012547
},
"comments" : {
> heroku addons:add heroku-postgresql:standard-yanari
Adding heroku-postgresql:standard-yanari on sheltered-gorge-2600... failed
@Meekohi
Meekohi / gist:11164452
Created April 22, 2014 03:26
Solve Poisson Equation with FFT
// Get CImg.h from http://sourceforge.net/projects/cimg/
#include "CImg.h"
using namespace cimg_library;
int main() {
const CImg<> img("image.jpg");
// Estimate gradient (uses forward finite difference scheme).
const CImgList<> gradient = img.get_gradient("xy",1);
/*
This example throws this (uncatchable) exception:
/node_modules/aws-sdk/lib/request.js:34
throw e;
^
NoSuchKey: The specified key does not exist.
*/
var secrets = require('./secrets').development;
@Meekohi
Meekohi / gist:b0fd972e08460c49380b
Created September 16, 2014 20:02
add data to leaflet marker
c.on('add',function(e){
$(this._container).attr("id",gram.id+"_circle");
});

Keybase proof

I hereby claim:

  • I am meekohi on github.
  • I am meekohi (https://keybase.io/meekohi) on keybase.
  • I have a public key whose fingerprint is E652 7C33 B864 6056 5299 D1A2 D73E ED09 D0EB AD2A

To claim this, I am signing this object:

{
size: 10000,
"query" : {
"match_all" : {}
},
"filter" : {
"geo_distance" : {
"distance" : "10000m",
"distance_type": "plane",
"geo" : [37.411, -77.653]
@Meekohi
Meekohi / README.md
Last active August 29, 2015 14:16
Force layout with background Voronoi cells

Force layout with background Voronoi cells

# Old code
i = 0
@views.each do |view|
while (view[1].to_s != (@startDate+i).to_s) && (i < 30) do
#if no data for that day put 0 views in
@monthViewArray.push(0)
i+=1
end
#otherwise put in the number of views
@monthViewArray.push(view[0])
$ rake assets:precompile --trace
** Invoke assets:precompile (first_time)
** Invoke assets:environment (first_time)
** Execute assets:environment
** Invoke environment (first_time)
** Execute environment
** Execute assets:precompile
rake aborted!
Sass::SyntaxError: Invalid CSS after "...(__p,arguments)": expected "{", was ";};with(obj||{}..."
(sass):1