Skip to content

Instantly share code, notes, and snippets.

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

Block or report user

Report or block fizerkhan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@fizerkhan
fizerkhan / atatus-netsuite-error.js
Created Dec 19, 2018
Atatus Error Reporting in NetSuite
View atatus-netsuite-error.js
require(["N/https"], function(https) {
function sendErrorPayload(apikey, error, options) {
if (!apikey) {
throw new Error("API Key is missing!")
}
if (!error || !error.stack) {
throw new Error("Invalid error!")
}
@fizerkhan
fizerkhan / Dockerfile
Last active Feb 20, 2018
Docker Compose build is not working
View Dockerfile
FROM node:0.10
CMD [ "npm", "start", "#custom" ]
@fizerkhan
fizerkhan / AtatusExceptionHandler.php
Last active Feb 8, 2018
Atatus Exception Handler for Lumen Framework
View AtatusExceptionHandler.php
<?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 Feb 8, 2018
Atatus Middleware for Lumen Framework
View AtatusLumenMiddleware.php
<?php
// app/Http/Middleware/AtatusLumenMiddleware.php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Http\Request;
/**
* Class AtatusLumenMiddleware
@fizerkhan
fizerkhan / app.js
Created Jan 20, 2018
Sample App for Koa middleware with Atatus
View app.js
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();
View AwaitingReply.gs
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 / cluster.js
Created Jan 17, 2018
Node Cluster with Atatus APM
View cluster.js
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 / codeship.md
Last active Nov 14, 2017
Tracking Deployments With Atatus
View codeship.md

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 / 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 Hunter.io API key
@fizerkhan
fizerkhan / install-gcc48-linuxbrew-centos6.md
Last active Sep 25, 2017 — forked from stephenturner/install-gcc48-linuxbrew-centos6.md
Installing gcc 4.8 and Linuxbrew on CentOS 6
View install-gcc48-linuxbrew-centos6.md

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:

You can’t perform that action at this time.