Skip to content

Instantly share code, notes, and snippets.

Avatar

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

View GitHub Profile
View html
○ → curl https://sparkshoes.com.au/login
<!DOCTYPE html>
<!--[if IE 9 ]>
<html class="ie ie9" lang="en" class="no-js"> <![endif]-->
<!--[if !(IE)]><!-->
<html lang="en" class="no-js">
<!--<![endif]-->
<head>
<title>Automox</title>
@fizerkhan
fizerkhan / atatus-netsuite-error.js
Created December 19, 2018 13:38
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 February 20, 2018 12:40
Docker Compose build is not working
View Dockerfile
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
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 February 8, 2018 13:11
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 January 20, 2018 13:08
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();
@fizerkhan
fizerkhan / AwaitingReply.gs
Created January 17, 2018 18:11 — forked from colinloretz/AwaitingReply.gs
AwaitingReply
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 January 17, 2018 15:15
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 November 14, 2017 12:12
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 October 20, 2017 09:55 — 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