Skip to content

Instantly share code, notes, and snippets.

View nick13jaremek's full-sized avatar
🦀
Doing stuff

Nick Jaremek nick13jaremek

🦀
Doing stuff
View GitHub Profile
@kitek
kitek / gist:1579117
Created January 8, 2012 17:50
NodeJS create md5 hash from string
var data = "do shash'owania";
var crypto = require('crypto');
crypto.createHash('md5').update(data).digest("hex");
@snormore
snormore / mongotestrunner.py
Created September 21, 2012 06:23
Django, MongoDB, and MongoEngine: A custom TestRunner managing mongo test database creation and cleanup.
#coding: utf-8
from django.test.simple import DjangoTestSuiteRunner
from nose.plugins.skip import SkipTest
from mongoengine.python_support import PY3
from mongoengine import connect
try:
from django.test import TestCase
from django.conf import settings
@monkeymonk
monkeymonk / gist:8058289
Last active January 8, 2022 09:25
List of all icons of Font Awesome 4.0.3 #resources
fa-glass
fa-music
fa-search
fa-envelope-o
fa-heart
fa-star
fa-star-o
fa-user
fa-film
fa-th-large
@santhoshtr
santhoshtr / Logger.js
Last active October 17, 2018 12:00
Winston based configurable node logger
var winston = require( 'winston' ),
fs = require( 'fs' ),
logDir = 'log', // Or read from a configuration
env = process.env.NODE_ENV || 'development',
logger;
winston.setLevels( winston.config.npm.levels );
winston.addColors( winston.config.npm.colors );
if ( !fs.existsSync( logDir ) ) {
@andrewxhill
andrewxhill / run.sql
Last active August 29, 2015 14:06
Tim's transform of dentists
select * from (
select the_geom as the_geom_webmercator,
min(ST_Distance_Sphere(st_transform(st_centroid(the_geom), 4326), st_transform(otherGeom, 4326)))/1600 as minDist
from (
select grids.the_geom, st_collect(st_transform(timchung.allbusiness.the_geom, 3857)) as otherGeom
from (
SELECT CDB_HexagonGrid(
ST_SetSRID(
ST_Envelope(
ST_Collect(
@masatomo
masatomo / gist:983a84bad9671dc29213
Last active February 28, 2018 08:49
How to use MongoDB 2.6.x on CircleCI (circle.yml)
dependencies:
cache_directories:
- mongodb-linux-x86_64-2.6.4
pre:
- if [[ ! -d mongodb-linux-x86_64-2.6.4 ]]; then wget http://downloads.mongodb.org/linux/mongodb-linux-x86_64-2.6.4.tgz && tar xvzf mongodb-linux-x86_64-2.6.4.tgz; fi
- sudo /etc/init.d/mongodb stop
- sudo cp mongodb-linux-x86_64-2.6.4/bin/* /usr/bin
- sudo /etc/init.d/mongodb start
@medmunds
medmunds / README.md
Created March 29, 2016 02:32
Taking back your Mandrill click-tracking links

Taking back your Mandrill click-tracking links

My company, like many, has recently switched away from using Mandrill for our transactional email.

We'd been using Mandrill's [click-tracking][mandrill-click-tracking] feature, and became worried about what would happen to all those old emailed links after we cancel our Mandrill account.

Why should we care about links in emails sent a month or more ago?