Skip to content

Instantly share code, notes, and snippets.


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

View GitHub Profile
fizerkhan / Dockerfile
Last active Feb 20, 2018
Docker Compose build is not working
View Dockerfile
FROM node:0.10
CMD [ "npm", "start", "#custom" ]
fizerkhan / AtatusExceptionHandler.php
Last active Feb 8, 2018
Atatus Exception Handler for Lumen Framework
View AtatusExceptionHandler.php
// app/Exceptions/AtatusExceptionHandler.php
namespace App\Exceptions;
use Exception;
use Illuminate\Contracts\Debug\ExceptionHandler;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
fizerkhan / AtatusLumenMiddleware.php
Created Feb 8, 2018
Atatus Middleware for Lumen Framework
View AtatusLumenMiddleware.php
// app/Http/Middleware/AtatusLumenMiddleware.php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Http\Request;
* Class AtatusLumenMiddleware
fizerkhan / app.js
Created Jan 20, 2018
Sample App for Koa middleware with Atatus
View app.js
const atatus = require("atatus-node");
apiKey: 'API KEY',
const koaAtatus = require('koa-atatus')(atatus);
const Koa = require('koa'),
Router = require('koa-router');
const app = new Koa();
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 /
Last active Nov 14, 2017
Tracking Deployments With Atatus

Tracking Deployments With Atatus

About Atatus

Atatus helps you monitor the performance and track errors related to your web and back-end applications. During your continuous deployment workflow with Codeship Pro, you can record your deployments in Atatus.

By using Atatus, you can compare metrics and errors with previous deployment.

Their documentation does a great job of providing more information, in addition to the setup instructions below.

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.


fizerkhan / app.js
Created Jun 7, 2017
Atatus Node Agent with ES6
View app.js
import http from 'http';
import express from 'express';
import morgan from 'morgan';
import bodyParser from 'body-parser';
let app = express();
app.server = http.createServer(app);
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'];