Skip to content

Instantly share code, notes, and snippets.


Fizer Khan (பைசர் கான்) fizerkhan

View GitHub Profile
View Timeline.html
<!DOCTYPE html>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no" />
<p>This is a basic example of creating your own Timeline for viewing in the Web Inspector Timeline view.</p>
<p>Save the string logged to the console in a JSON file. Then load into the Timeline.</p>
function label_awaiting_reply() {
var emailAddress = Session.getEffectiveUser().getEmail();
var EMAIL_REGEX = /[a-zA-Z0-9\._\-]+@[a-zA-Z0-9\.\-]+\.[a-z\.A-Z]+/g;
var label = GmailApp.createLabel("AwaitingReply");
var d = new Date();
d.setDate(d.getDate() - 7);
var dateString = d.getFullYear() + "/" + (d.getMonth() + 1) + "/" + d.getDate();
threads ="in:Sent after:" + dateString);
for (var i = 0; i < threads.length; i++)
AshKyd / rfc2822.js
Last active Apr 27, 2022
A momentjs RFC2822 formatted date string.
View rfc2822.js
var DATE_RFC2822 = "ddd, DD MMM YYYY HH:mm:ss ZZ";
idosela / http-response-interceptor.js
Last active Nov 3, 2021
Sample code for ng-conf 2014
View http-response-interceptor.js
angular.module('myMdl', []).config(['$httpProvider', function($httpProvider) {
'$q', '$templateCache', 'activeProfile',
function($q, $templateCache, activeProfile) {
// Keep track which HTML templates have already been modified.
var modifiedTemplates = {};
// Tests if there are any keep/omit attributes.
var HAS_FLAGS_EXP = /data-(keep|omit)/;
hemanth / devtool.bash
Created Nov 23, 2013
Hacking Chrome DevTools Setup
View devtool.bash
#!/usr/bin/env bash
# Setup script for hacking chrome devtools
# Source ->
echo "Creating folder and initialize a git repo"
mkdir devtools-frontend && cd devtools-frontend
git init
echo "Adding chromium remote and initialize sparse checkout"
git remote add upstream
ryanray / deploy.rb
Created Nov 21, 2013
I couldn't find a quick example of how to deploy a node.js app using Capistrano 3. This gist assumes you are using Capistrano 3, Upstart, Forever, ssh/forward agent, and an unprivileged user named 'deploy'. Hopefully this simple setup will help to get you started.
View deploy.rb
# config/deploy.rb
# probably a lot of ways to improve this...
set :application, 'my_app'
set :repo_url, ''
# should set up a deploy user
set :user, 'deploy'
set :deploy_to, '/var/www/my_app'
set :scm, :git
danriti /
Last active Jul 19, 2021
HipChat API v2 - Send a message to a room using cURL
# Set the ROOM_ID & AUTH_TOKEN variables below.
# Further instructions at
MESSAGE="Hello world!"
curl -H "Content-Type: application/json" \
tinabeans / template.html
Last active Jun 29, 2022
A super-barebones single-column responsive email template, assuming a max-width of 540px. Read about it on the Fog Creek blog.
View template.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Single-Column Responsive Email Template</title>
@media only screen and (min-device-width: 541px) {
.content {
chrisckchang / mongoose-options.js
Last active Aug 13, 2019
mongoose connection options
View mongoose-options.js
/* Mongoose 3.8.x configuration settings
* As discussed in:
var mongoose = require('mongoose');
var uriUtil = require('mongodb-uri');
* Mongoose by default sets the auto_reconnect option to true.
View angular.js
// Because people can't seem to find the gist description, here is the source
// of this code, a post found in last weeks JS Weekly, it is not my code
angular.module('ui-multi-gravatar', [])
.directive('multiAvatar', ['md5', function (md5) {
return {
restrict: 'E',
link:function(scope, element, attrs) {