Skip to content

Instantly share code, notes, and snippets.

@ammarshah
ammarshah / all_email_provider_domains.txt
Last active April 29, 2024 06:56
A list of all email provider domains (free, paid, blacklist etc). Some of these are probably not around anymore. I've combined a dozen lists from around the web. Current "major providers" should all be in here as of the date this is created.
0-mail.com
007addict.com
020.co.uk
027168.com
0815.ru
0815.su
0clickemail.com
0sg.net
0wnd.net
0wnd.org
@addyosmani
addyosmani / package.json
Last active January 18, 2024 21:31
npm run-scripts boilerplate
{
"name": "my-app",
"version": "1.0.0",
"description": "My test app",
"main": "src/js/index.js",
"scripts": {
"jshint:dist": "jshint src/js/*.js",
"jshint": "npm run jshint:dist",
"jscs": "jscs src/*.js",
"browserify": "browserify -s Validating -o ./dist/js/build.js ./lib/index.js",
@voxtex
voxtex / gist:11239483
Created April 24, 2014 02:31
Starting Gulpfile
var gulp = require('gulp'),
lp = require('gulp-load-plugins')(), // automatically load our plugins
_ = require('lodash');
function join(p1, p2) {
if(_.isArray(p2)) {
return _.map(p2, _.partial(join, p1));
}
return path.join(p1, p2 || '');
}
@tamoyal
tamoyal / gist:10441108
Created April 11, 2014 04:39
Create super user and database user in Mongo 2.6
# Create your superuser
$ mongo
> use admin
> db.createUser({user:"someadmin",pwd:"secret", roles:[{role:"root",db:"admin"}]})
> exit
# Alias for convenience (optional and at your own risk)
$ echo 'alias mongo="mongo --port 27017 -u someadmin -p secret --authenticationDatabase admin"' >> ~/.bash_profile
$ source ~/.bash_profile
@avaliani
avaliani / geocoder-service.js
Last active February 3, 2022 16:13 — forked from benmj/geocoder-service.js
This is a fork of @benmj 's Angular JS Geocoder service. It fixes the following bugs (1) rootscope apply missing, (2) executeNext() not being called if the response type is 'zero results', 'request denied' or 'invalid result', and (3) it simplifies the query pause logic (no increasing pause times and tasks are rejected if we are still over quota…
/*
* An AngularJS Service for intelligently geocoding addresses using Google's API. Makes use of
* localStorage (via the ngStorage package) to avoid unnecessary trips to the server. Queries
* Google's API synchronously to avoid `google.maps.GeocoderStatus.OVER_QUERY_LIMIT`.
*
* @author: benmj
* @author: amir.valiani
*
* Original source: https://gist.github.com/benmj/6380466
*/
'use strict';
var CordovaInit = function() {
var onDeviceReady = function() {
receivedEvent('deviceready');
};
var receivedEvent = function(event) {
console.log('Start event received, bootstrapping application setup.');
@suras
suras / agularjs reverse geocoding
Created December 31, 2013 13:27
angular.js getting location with html5 location api and reverse geocoding
// to get the current latitude and longitude from browser
// credits https://github.com/arunisrael/angularjs-geolocation
'use strict';
angular.module('geolocation',[]).constant('geolocation_msgs', {
'errors.location.unsupportedBrowser':'Browser does not support location services',
'errors.location.notFound':'Unable to determine your location',
});
angular.module('geolocation')
var async = require('async');
var ProgressBar = require('progress');
var monk = require('monk');
var ObjectId=require('mongodb').ObjectID;
var dest = monk('localhost:27017/storify_localhost');
var backup = monk('localhost:27017/storify_backup');
var userId = ObjectId(YOUR-OBJECT-ID); // monk should have auto casting but we need it for queries
public static void SetAppearance()
{
if (Util.IsIOS5OrBetter)
{
UINavigationBar.Appearance.SetBackgroundImage(
Resources.NavBarHeaderBackground,
UIBarMetrics.Default);
UIBarButtonItem.Appearance.SetBackgroundImage(
Resources.BarButtonNormal.CreateResizableImage(new UIEdgeInsets(0,5,0,5)),
@jaredhanson
jaredhanson / gist:2559730
Created April 30, 2012 16:20
Restify and Passport /cc Hal Robertson
// Based off example code from Hal Robertson
// https://github.com/halrobertson/test-restify-passport-facebook
// See discussion: https://groups.google.com/forum/?fromgroups#!topic/passportjs/zCz0nXB_gao
var restify = require('restify')
// config vars
var FB_LOGIN_PATH = '/api/facebook_login'
var FB_CALLBACK_PATH = '/api/facebook_callback'
var FB_APPID = '<<YOUR APPID HERE>>'