Skip to content

Instantly share code, notes, and snippets.

View JBreit's full-sized avatar

Jason Breitigan JBreit

  • Inner Mind Co.
  • Lancaster, PA
View GitHub Profile
@JBreit
JBreit / sql-mongo_comparison.md
Last active September 16, 2015 01:09 — forked from aponxi/sql-mongo_comparison.md
MongoDb Cheat Sheets

SQL to MongoDB Mapping Chart

SQL to MongoDB Mapping Chart

In addition to the charts that follow, you might want to consider the Frequently Asked Questions section for a selection of common questions about MongoDB.

Executables

The following table presents the MySQL/Oracle executables and the corresponding MongoDB executables.

@jahan-addison
jahan-addison / tetrad.js
Last active August 29, 2015 14:09
Non-deterministic tetrad color set for visual applications
var Tetrad = function() {
this.degrees = 30;
this.colors;
};
Tetrad.prototype = (function() {
/**
* Private
*/
module.exports = (function(window) {
'use strict';
var console = window.console;
var document = window.document;
// For comparison.
var f = 'function';
var o = 'object';
@nathansmith
nathansmith / sort_by_key_value.js
Last active September 15, 2021 14:22
Function to sort an array of objects by a particular key's value.
function sort_by_key_value(arr, key) {
var to_s = Object.prototype.toString;
var valid_arr = to_s.call(arr) === '[object Array]';
var valid_key = typeof key === 'string';
if (!valid_arr || !valid_key) {
return;
}
arr = arr.slice();
@DanielMarklund
DanielMarklund / gist:3415529
Created August 21, 2012 13:39
Laravel - Navigation Active Class
<!-- Example on how to set class="active" on active navigation links -->
<!-- These links will always be visible -->
<li class="{{ URI::is( 'home') ? 'active' : '' }}">
<a href="{{ URL::to( 'home') }}">
Home
</a>
</li>
<li class="{{ URI::is( 'gallery') ? 'active' : '' }}">
@tomerd
tomerd / gauge.js
Last active April 21, 2024 21:08
google style gauges using javascript d3.js
function Gauge(placeholderName, configuration)
{
this.placeholderName = placeholderName;
var self = this; // for internal d3 functions
this.configure = function(configuration)
{
this.config = configuration;
@fernandezpablo85
fernandezpablo85 / node-curry.js
Created May 4, 2011 15:32
Explanation of the curry function for node.js
function curriedReadFile(path) {
var _done, _error, _result;
var callback = function(error, result) {
_done = true,
_error = error,
_result = result;
};
fs.readFile(path, function(e, r) {