This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define _GNU_SOURCE | |
#include <sys/types.h> | |
#include <sys/stat.h> | |
#include <sys/mount.h> | |
#include <sys/wait.h> | |
#include <sys/syscall.h> | |
#include <fcntl.h> | |
#include <sched.h> | |
#include <unistd.h> | |
#include <stdio.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @ts-check | |
// eslint-plugin-jsdoc doesn't support @template | |
/* eslint-disable jsdoc/no-undefined-types,jsdoc/check-tag-names */ | |
/** | |
* Copy an array, the lame way | |
* @template T | |
* @param {T[]} source Source array | |
* @param {T[]} dest Destination array | |
* @param {number} srcStart Start index of source array | |
* @param {number} srcEnd End index of source array plus one |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
libtoolize | |
aclocal | |
autoreconf --install | |
autoconf | |
automake --add-missing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const repl = require('repl'); | |
const LeagueClientAPI = require('./lol-client-api'); | |
const http = require('http'); | |
const util = require('util'); | |
// set this to the path to LeagueClient.exe (example for linux) | |
const LEAGUE_EXE_PATH = process.env.HOME + '/Games/league-of-legends/drive_c/Riot Games/League of Legends/LeagueClient.exe'; | |
// options for util.inspect when formatting responses | |
const INSPECT_OPTS = { | |
depth: Infinity, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// dependencies: pngjs raw-socket | |
// part of a filing cabinet! | |
const ping = require('./net-ping.js'); | |
const util = require('util'); | |
const PNG = require('pngjs').PNG; | |
const fs = require('fs'); | |
const cluster = require('cluster'); | |
const IMAGE = 'draw.png'; | |
const X_OFFSET = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const SELECTOR = '.zr_zergling_container'; | |
/** | |
* Fire a mouse event on an element | |
* @param {Element} node | |
* @param {String} type | |
*/ | |
function triggerMouseEvent(node, type) { | |
let event = document.createEvent('MouseEvent'); | |
event.initEvent(type, true, true); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Passes most of the tests on http://ircbot.science/ | |
// needs a URL regex put in the URL_REGEX variable. | |
// use this one if you want: https://gist.github.com/iczero/513afbc94291735a0d94a5a6d0be3827 | |
/** | |
* Get title of webpage by url | |
* @param {String} qurl URL in question | |
* @param {Function} callback Callback when page title is found | |
* @param {Number} num Number of redirects encountered (usually 0) | |
* @return {void} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* A regex that can match URLs in strings. | |
* Modified so they can match most of the formats people use for URLs | |
* and not leave out parts of URLs when not anchored. | |
* | |
* Sources: | |
* https://gist.github.com/dperini/729294 for the url-matching part | |
* https://gist.github.com/syzdek/6086792 for the IPv6 regex | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// generate TI random values and seeds | |
const mod1 = 2147483563; | |
const mod2 = 2147483399; | |
const mult1 = 40014; | |
const mult2 = 40692; | |
/** | |
* Check whether two arrays are equal to each other | |
* @param {Array} arr1 | |
* @param {Array} arr2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// spam the scammers until they're gone | |
// dependencies: an-array-of-english-words request blessed | |
const request = require('request'); | |
const words = require('an-array-of-english-words'); | |
const blessed = require('blessed'); | |
const http = require('http'); | |
const EventEmitter = require('events'); | |
const UI_UPDATE_INTERVAL = 100; | |
const EMAIL_DOMAINS = [ |