Skip to content

Instantly share code, notes, and snippets.

View ronsuez's full-sized avatar

Ronald Suez ronsuez

View GitHub Profile
@PascalAnimateur
PascalAnimateur / Place.js
Last active February 22, 2021 20:19
Geospatial example in Sails.js using native MongoDB query
/* Place model */
module.exports = {
attributes: {
name: {
type: 'string',
required: true
},
@jiaaro
jiaaro / installing_pyaudio.md
Last active May 2, 2024 10:15
How to install PyAudio into a VirtualEnv on Mac OS X 10.10

Install portaudio using homebrew (or method of your choice)

brew install portaudio

create $HOME/.pydistutils.cfg using the include and lib directories of your portaudio install:

[build_ext]
@icchan
icchan / geospatial-querying-with-go-and-mongodb.go
Created October 18, 2014 07:37
Geospatial Querying with GoLang and MongoDB
package main
import (
"encoding/json"
"fmt"
"gopkg.in/mgo.v2"
"gopkg.in/mgo.v2/bson"
"log"
)
/*
* Example of encrypted localstorage with CryptoJS.
* http://codepen.io/anon/pen/aCDHo
*
*/
var EncryptedLocalStorage = (function(global) {
'use strict';
// Constructor
var EncryptedLocalStorage = function(secret) {
@guilleferrer
guilleferrer / Date Range Mongo Query
Created January 24, 2012 11:50
Query for a date range using Mongo Timestamps
db.Collection.find({
created_at : {
'$gte': new Timestamp(new Date(2012, 0, 21), 0),
'$lte': new Timestamp(new Date(2012, 0, 22), 0)
})