Skip to content

Instantly share code, notes, and snippets.

View fizerkhan's full-sized avatar

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

View GitHub Profile
@fizerkhan
fizerkhan / income-tax-india.md
Last active June 7, 2018 07:04
Indian Income Tax questions
  1. What to write in the ITR-V form at I further declare that I am making this return in my capacity as ----------?

Answer: In case you have used e-filing (either directly through NSDL or through Skorydov etc), you may leave it blank. If this was filed by any other CA, then he/she has to fill their name and designation.

@fizerkhan
fizerkhan / cluster.js
Created January 17, 2018 15:15
Node Cluster with Atatus APM
var cluster = require('cluster');
if (cluster.isMaster) {
// Count the machine's CPUs
var cpuCount = require('os').cpus().length;
// Create a worker for each CPU
for (var i = 0; i < cpuCount; i += 1) {
cluster.fork();
}
@fizerkhan
fizerkhan / Dockerfile
Last active February 20, 2018 12:40
Docker Compose build is not working
FROM node:0.10
CMD [ "npm", "start", "#custom" ]
@fizerkhan
fizerkhan / AtatusExceptionHandler.php
Last active February 8, 2018 13:44
Atatus Exception Handler for Lumen Framework
<?php
// app/Exceptions/AtatusExceptionHandler.php
namespace App\Exceptions;
use Exception;
use Illuminate\Contracts\Debug\ExceptionHandler;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
/**
@fizerkhan
fizerkhan / AtatusLumenMiddleware.php
Created February 8, 2018 13:11
Atatus Middleware for Lumen Framework
<?php
// app/Http/Middleware/AtatusLumenMiddleware.php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Http\Request;
/**
* Class AtatusLumenMiddleware
@fizerkhan
fizerkhan / app.js
Created January 20, 2018 13:08
Sample App for Koa middleware with Atatus
const atatus = require("atatus-node");
atatus.start({
apiKey: 'API KEY',
});
const koaAtatus = require('koa-atatus')(atatus);
const Koa = require('koa'),
Router = require('koa-router');
const app = new Koa();
@fizerkhan
fizerkhan / AwaitingReply.gs
Created January 17, 2018 18:11 — forked from colinloretz/AwaitingReply.gs
AwaitingReply
function label_awaiting_reply() {
var emailAddress = Session.getEffectiveUser().getEmail();
Logger.log(emailAddress);
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 = GmailApp.search("in:Sent after:" + dateString);
for (var i = 0; i < threads.length; i++)
@fizerkhan
fizerkhan / codeship.md
Last active November 14, 2017 12:12
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
fizerkhan / install-gcc48-linuxbrew-centos6.md
Last active September 25, 2017 12:06 — forked from stephenturner/install-gcc48-linuxbrew-centos6.md
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.

Resources:

@fizerkhan
fizerkhan / app.js
Created June 7, 2017 07:32
Atatus Node Agent with ES6
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);
app.use(morgan('dev'));
app.use(bodyParser.json({}));