Skip to content

Instantly share code, notes, and snippets.


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

View GitHub Profile
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++)
fizerkhan / Email-verifier.js
Created Oct 20, 2017 — forked from augfrank/Email-verifier.js
Google Sheet script to verify email addresses automatically
View Email-verifier.js
* A custom function that verifies an email ID
* @param {String} email ID
* @return {Boolean} If the email ID is active
* @customfunction
function verifyEmail(email) {
// Replace this with your API key
fizerkhan /
Last active Sep 25, 2017 — forked from stephenturner/
Installing gcc 4.8 and Linuxbrew on CentOS 6

Installing gcc 4.8 and Linuxbrew on CentOS 6

The GCC distributed with CentOS 6 is 4.4.7, which is pretty outdated. I'd like to use gcc 4.8+. Also, when trying to install Linuxbrew you run into a dependency loop where Homebrew's gcc depends on zlib, which depends on gcc. Here's how I solved the problem.

Note: Requires sudo privileges.


View gist:d858614e264394736e9f4921e809b27d
// PDO Connection to MySQL
$conn = new PDO('mysql:host=localhost;dbname=yourdbname', 'username', 'password');
// PDO Connection to PostgreSQL
$conn = new PDO('pgsql:host=localhost;dbname=yourdbname', 'username', 'password');
// A quick Select Query with For Loop
foreach ($conn->query("SELECT * FROM profile") as $row)
echo $row['fullname'];
View FeedlyCenteredSlider.user.js
// ==UserScript==
// @name Feedly Centered Slider
// @namespace
// @version 2.0
// @description Centers the slider on Feedly
// @match*
// @grant GM_addStyle
// @require
// ==/UserScript==
# -*- coding: utf-8 -*-
import itertools
import re
import urlparse
import boto
import warc
from boto.s3.key import Key
from gzipstream import GzipStreamFile
fizerkhan / alexa.js
Created Nov 27, 2016 — forked from chilts/alexa.js
Getting the Alexa top 1 million sites directly from the server, unzipping it, parsing the csv and getting each line as an array.
View alexa.js
var request = require('request');
var unzip = require('unzip');
var csv2 = require('csv2');
.on('entry', function (entry) {
entry.pipe(csv2()).on('data', console.log);
fizerkhan / nginx.conf
Created Feb 4, 2016 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here
View nginx.conf
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
fizerkhan / haproxy.cfg
Created Oct 26, 2015 — forked from GABeech/haproxy.cfg
Stack Exchange HAProxy
View haproxy.cfg
# This is an example of the Stack Exchange Tier 1 HAProxy config
# The only things that have been changed from what we are running are:
# 1. User names have been removed
# 2. All Passwords have been remove
# 3. IPs have been changed to use the example/documentation ranges
# 4. Rate limit numbers have been changed to randome numbers, don't read into them
userlist stats-auth
group admin users $admin_user
user $admin_user insecure-password $some_password
fizerkhan / autofocus.js
Last active Aug 29, 2015 — forked from mlynch/autofocus.js
AngularJS Autofocus directive
View autofocus.js
* the HTML5 autofocus property can be finicky when it comes to dynamically loaded
* templates and such with AngularJS. Use this simple directive to
* tame this beast once and for all.
* Usage:
* <input type="text" autofocus>
angular.module('utils.autofocus', [])