Skip to content

Instantly share code, notes, and snippets.

View ishan-marikar's full-sized avatar

Ishan Marikar ishan-marikar

View GitHub Profile
#!/usr/bin/env python3
from __future__ import print_function
import frida
import sys
import json
import time
def on_message(message, payload):
if(message['type'] == 'send'):
@ishan-marikar
ishan-marikar / allow_paste.js
Created October 31, 2018 10:42 — forked from mstifflin/allow_paste.js
Don't fuck with paste
// Open up the console and paste this in to prevent sites
// from blocking your pastes into password fields
// This allows you to continue using your password manager
// without it being a giant PITA.
var allowPaste = function(e){
e.stopImmediatePropagation();
return true;
};
document.addEventListener('paste', allowPaste, true);
@ishan-marikar
ishan-marikar / axios-instance-config.js
Created October 17, 2018 07:47 — forked from ccnokes/axios-instance-config.js
Good default configuration for axios in node.js
const axios = require('axios');
const http = require('http');
const https = require('https');
module.exports = axios.create({
//60 sec timeout
timeout: 60000,
//keepAlive pools and reuses TCP connections, so it's faster
httpAgent: new http.Agent({ keepAlive: true }),
@ishan-marikar
ishan-marikar / Javascript ISO country code to country name conversion
Created August 26, 2018 11:43 — forked from maephisto/Javascript ISO country code to country name conversion
ISO 3166-1 alpha-2 country code to country name conversion with a simple Javascript implementation, an array and a function.
var isoCountries = {
'AF' : 'Afghanistan',
'AX' : 'Aland Islands',
'AL' : 'Albania',
'DZ' : 'Algeria',
'AS' : 'American Samoa',
'AD' : 'Andorra',
'AO' : 'Angola',
'AI' : 'Anguilla',
'AQ' : 'Antarctica',
async *scraper() {
let noMorePages = false;
let currentPageURL = this._searchURL;
while (!noMorePages) {
try {
let listingsForCurrentPage = await this._getListingsFromPage(
currentPageURL
@ishan-marikar
ishan-marikar / ratios.js
Created July 25, 2018 10:35 — forked from du5rte/ratios.js
Expand Ratios
// https://stackoverflow.com/questions/14224535/scaling-between-two-number-ranges
function withinRange(val, { min, max }) {
return (
val > max
? max
: val < min
? min
: val
);
@ishan-marikar
ishan-marikar / Auth.js
Created July 25, 2018 10:05 — forked from du5rte/Auth.js
mobX Auth Store
import mobx, { computed, observable, action } from "mobx"
import store from "store"
import autoStore from "./autoStore"
class Auth {
constructor() {
autoStore("authentication", this)
}
12/10 2017
--[ 1 - Internet Chemotherapy
Internet Chemotherapy was a 13 month project between Nov 2016 - Dec 2017.
It has been known under names such as 'BrickerBot', 'bad firmware
upgrade', 'ransomware', 'large-scale network failure' and even
'unprecedented terrorist actions.' That last one was a little harsh,
Fernandez, but I guess I can't please everybody.
@ishan-marikar
ishan-marikar / App.js
Created June 18, 2018 10:00 — forked from fdidron/App.js
React Router v4 Auth
//Usage
import React from 'react';
import { BrowserRouter as Router } from 'react-router-dom';
import Route from './AuthRoute';
import Login from './Login';
import Private from './Private';
export default () =>
<Router>
@ishan-marikar
ishan-marikar / nginx.conf
Created May 9, 2018 07:09 — forked from weapp/nginx.conf
Return common errors as json in Nginx
error_page 500 /500.html;
location /500.html{
return 500 '{"error": {"status_code": 500,"status": "Internal Server Error"}}';
}
error_page 502 /502.html;
location /502.html{
return 502 '{"error": {"status_code": 502,"status": "Bad Gateway"}}';
}