Skip to content

Instantly share code, notes, and snippets.

View iitsuraj's full-sized avatar
🏠
Working from home

iitsuraj

🏠
Working from home
View GitHub Profile
@iitsuraj
iitsuraj / Suraj_instagram_follow_bot
Last active August 15, 2019 22:57
Instagram Follow Bot
var count =0;
function follow(button, arrow) {
console.log(count);
button.click();
count++;
next(arrow)
}
function next(arrow) {
if (arrow == null) {
@iitsuraj
iitsuraj / gist:d9e47a187d4e9d72d4f2d4cbb813716c
Created October 18, 2019 00:10
bootstrap-material-design.min.js
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(require("jquery"),require("popper.js")):"function"==typeof define&&define.amd?define(["jquery","popper.js"],e):e(t.jQuery,t.Popper)}(this,function(t,e){"use strict";function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function i(t,e,i){return e&&n(t.prototype,e),i&&n(t,i),t}function r(){return(r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}function o(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}t=t&&t.hasOwnProperty("default")?t.default:t,e=e&&e.hasOwnProperty("default")?e.default:e;var s,a,l,c,h,u,d,f,p,m,g,_,v,y,E,b,C,I,T,A,S,w,D,N,O,k,$,j,R,L,P,x,F,M,Q,H,U,G,W,B,K,V,Y,q,z,X,Z,J,tt,et,nt,it,rt,ot,st,at,lt,ct,ht,ut,dt,ft,pt,mt,gt,_t,vt,yt,Et,bt,Ct,It,Tt
@iitsuraj
iitsuraj / LinedinEmailsScraper.js
Created January 14, 2020 16:44
Linkedin E-mail Scraper
function extractEmails(text) {
return text.match(/([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9_-]+)/gi);
}
function randomIntFromInterval(min, max) {
// min and max included
return Math.floor(Math.random() * (max - min + 1) + min);
}
function CommentProcess() {
if (
document.getElementById("show_prev") === null ||
@iitsuraj
iitsuraj / App.js
Created February 25, 2020 14:16
Redis demo for use
const express = require('express');
const fetch = require('node-fetch');
const redis = require('redis');
const PORT = process.env.PORT || 5000;
const REDIS_PORT = process.env.PORT || 6379;
const client = redis.createClient(REDIS_PORT);
const app = express();
const express = require("express");
const fs = require("fs");
const PORT = 5000;
const app = express();
const getActualRequestDurationInMilliseconds = start => {
const NS_PER_SEC = 1e9; // convert to nanoseconds
const NS_TO_MS = 1e6; // convert to milliseconds
const diff = process.hrtime(start);
@iitsuraj
iitsuraj / rate-limit.js
Created March 19, 2020 00:18
Api rate limiter
var limiter = require("../misc/rate-limit.js")
app.post("/create-account", limiter.createAccountLimiter, function(req, res) {
//...
});
@iitsuraj
iitsuraj / install-synapse.sh
Last active August 16, 2020 17:08
How to Install Matrix Synapse Chat on Ubuntu 18.04 LTS
#!/bin/bash
echo updating...
apt-get -qq update
echo update completed.
echo upgrading...
apt-get -qq --yes upgrade
echo upgrade completed
echo Installing dev dependency
apt-get -qq --yes install build-essential python3-dev libffi-dev python-pip python-setuptools sqlite3 libssl-dev python-virtualenv libjpeg-dev libxslt1-dev