Skip to content

Instantly share code, notes, and snippets.

@ackuser
ackuser / index.html
Created October 18, 2016 08:41 — forked from anonymous/index.html
Crossfilter Examples Jazoon Crossfilter example 3: Custom reduce functions // source http://jsbin.com/pubaz
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery.min.js"></script>
<link href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
<script src="http://d3js.org/d3.v3.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/crossfilter/1.3.11/crossfilter.min.js"></script>
@ackuser
ackuser / protractorAPICheatsheet.md
Created October 19, 2016 07:22 — forked from javierarques/protractorAPICheatsheet.md
Protractor API Cheatsheet
@ackuser
ackuser / gist:e6045b4c4e0196aa526b07fc7ef9c949
Created October 27, 2016 11:17 — forked from nherment/gist:1431054
MapReduce with MongoDB in NodeJS
var doMapReduce = function(options, callback) {
var map = function () {
var dateKey = new Date(options.time.getTime());
dateKey.setMinutes(0);
dateKey.setSeconds(0);
dateKey.setMilliseconds(0);
var mapped = {
@ackuser
ackuser / .block
Created November 22, 2016 09:26
fresh block
license: mit
@ackuser
ackuser / .block
Last active November 22, 2016 09:43
dcjs
license: mit
@ackuser
ackuser / mongodb-singleton.js
Created November 24, 2016 15:01 — forked from afshinm/mongodb-singleton.js
MongoDb singleton connection in NodeJs
var Db = require('mongodb').Db;
var Connection = require('mongodb').Connection;
var Server = require('mongodb').Server;
//the MongoDB connection
var connectionInstance;
module.exports = function(callback) {
//if already we have a connection, don't connect to database again
if (connectionInstance) {
callback(connectionInstance);
@ackuser
ackuser / curl.md
Created January 31, 2017 14:45 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@ackuser
ackuser / index.html
Created February 16, 2017 09:12 — forked from anonymous/index.html
Document // source http://jsbin.com/qelerogevi
<!doctype html>
<html lang="en" ng-app="app" ng-controller="MainController">
<head>
<meta charset="UTF-8">
<title>Document</title>
<meta name="google-signin-client_id" content="397577174832-p3q2lm8i45jnud4k259qu7du2l0biega.apps.googleusercontent.com">
</head>
<body>
// http://leafletjs.com/examples/quick-start-example.html in TypeScript
/// <reference path="leaflet.d.ts" />
var map = new L.Map("map");
map.setView(new L.LatLng(51.505, -0.09), 13);
var layer =new L.TileLayer("http://{s}.tile.cloudmade.com/BC9A493B41014CAABB98F0471D759707/997/256/{z}/{x}/{y}.png", { maxZoom: 18, attribution: "attribution test" })
layer.addTo(map);
// add marker
var marker = new L.Marker(new L.LatLng(51.5, -0.09));
marker.addTo(map).bindPopup("<b>Hello world!</b><br />I am a popup.").openPopup();
@ackuser
ackuser / gist:a509904405e06aba6711aa3a2bc7045c
Created April 7, 2017 09:41 — forked from osipov/gist:c2a34884a647c29765ed
Install Scala and SBT using apt-get on Ubuntu 14.04 or any Debian derivative using apt-get
sudo apt-get remove scala-library scala
sudo wget www.scala-lang.org/files/archive/scala-2.10.4.deb
sudo dpkg -i scala-2.10.4.deb
sudo apt-get update
sudo apt-get install scala
wget http://scalasbt.artifactoryonline.com/scalasbt/sbt-native-packages/org/scala-sbt/sbt/0.12.4/sbt.deb
sudo dpkg -i sbt.deb
sudo apt-get update
sudo apt-get install sbt