Skip to content

Instantly share code, notes, and snippets.

Shortcut Description
Cmd+Shift+O Open file by path/name
Cmd+Shift+O Open a class declaration in the project
Cmd+Opt+O Open a symbol in the project
Cmd+Fn+F12 Show symbols in current file

Google's authentication-less on-the-fly image resizing service

I found it while poking around the Google+ HTML. Jotting down some notes felt like a good idea, so here goes. If you know more about this API, let me know, please!

(Word of warning: I spent ~30 minutes on both my experimentation and this here write-up, so it might not be the most thought-provoking, brilliant thing you read today.)

@saich
saich / gmail_email.py
Last active August 29, 2015 14:22 — forked from erans/gmail_email.py
import sys
import re
import dns.resolver # Requires dnspython
email_host_regex = re.compile(".*@(.*)$")
gmail_servers_regex = re.compile("(.google.com.|.googlemail.com.)$", re.IGNORECASE)
def is_gmail(email):
""" Returns True if the supplied Email address is a @gmail.com Email or is a Google Apps for your domain - hosted Gmail address
Checks are performed by checking the DNS MX records """
@saich
saich / urlrequest.js
Created December 6, 2011 13:42 — forked from wilsonpage/reqUrl.js
A wrapper module for 'http.request' function...
// Based upon https://gist.github.com/1393666
var querystring = require('querystring'),
url = require('url'),
http = require('http');
/**
* @param {string} reqUrl The complete URL to send the request to
* @param {Object} options options of the request
* @param {Function} cb Callback function that is to be called with response / errors
@saich
saich / profiler.js
Created June 26, 2012 06:00
window.performance.now() wrapper for profiler use
/**
* @constructor
*/
function Profiler() {
}
/**
* Uses the best resolution timer that is currently available.
* The return value of this can only be used for measuring the time interval,
@saich
saich / webdev.tools.md
Last active October 12, 2015 04:38
Web Development Tools
@saich
saich / macosx-setup.md
Last active October 13, 2015 20:07
Mac OS X Setup

Install Software Updates

Install Xcode Developer Tools

Install nvm (Node Version Manager)

Install node.js

Install GitHub for Mac + SourceTree

@saich
saich / celery.md
Last active November 4, 2015 05:53
Reading List - Good articles
  • npm allows to replace existing packages with new packages (of same version).

Internal npm

  • Immutable packages.
  • Packages are published only after unit tests and functional tests are passed.
  • Only build systems can publish packages.
@saich
saich / Mojito-Middleware.md
Last active December 11, 2015 08:08
Useful links for Yahoo! Mojito

Applicable atleast to Yahoo! Mojito v0.5.3-1.

  • Middlewares are declared in the application.json.
  • The way the middleware works depends on the file name of the middleware.
  • If file name starts with mojito- (e.g: mojito-logger.js):
    • The exported function should return a function, that can be called with express's app.use. For example, you can return express.logger() and the framework shall call app.use(express.logger()) using this return value.
    • This approach is suitable to use app.use, since the express's app is not exposed in the Mojito framework.
    • The configuration received by this function is of form: `{ Y: Y, store: store,