Skip to content

Instantly share code, notes, and snippets.

🐞
i made bugs

iczero iczero

🐞
i made bugs
Block or report user

Report or block iczero

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
@iczero
iczero / autotools-build.sh
Created Apr 21, 2019
List of stuff to run to build something from source with autotools
View autotools-build.sh
libtoolize
aclocal
autoreconf --install
autoconf
automake --add-missing
@iczero
iczero / tinc-dist.sh
Last active Apr 21, 2019
Build a binary tarball of tinc
View tinc-dist.sh
#!/bin/bash
set -xe
if [[ $EUID -ne 0 ]]; then
fakeroot $0
exit $?
fi
umask 022
VERSION=$(git rev-parse --short HEAD)
libtoolize
aclocal
@iczero
iczero / build-proton.sh
Last active Apr 18, 2019
this script will probably not build proton
View build-proton.sh
# Build Proton. Hopefully.
# Note: DO NOT ACTUALLY RUN THIS SCRIPT. Copy/paste each command so if something goes wrong this thing
# doesn't murder your system by accident.
# You should probably run this in a container.
# If you decide to stop it when it is building wine32, make sure you reinstall the 64-bit versions of
# the libraries so you don't have a massive headache while trying to build 64-bit things later on.
git clone --depth 10 https://github.com/ValveSoftware/Proton ./proton --recursive --shallow-submodule
cd proton
# reset all the submodules, no clue why this is needed
View lol-client-api-cli.js
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,
View drawer.js
// 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;
View zergrush.js
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);
@iczero
iczero / getUrlTitle.js
Created Nov 30, 2018
Crappy function that gets URL title. Will fix later probably
View getUrlTitle.js
// 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}
@iczero
iczero / urlregex.js
Last active Nov 30, 2018
A URL-matching regular expression
View urlregex.js
/**
* 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
*/
@iczero
iczero / build-vscode.sh
Last active May 16, 2019
Compile linux builds of VSCode from source
View build-vscode.sh
#!/bin/bash
# note: certain directory names have been changed to the original to
# preserve compatibility with certain extensions that do not expect
# changed directory names
export NVM_DIR="$(realpath nvm)" && (
git clone https://github.com/creationix/nvm.git "$NVM_DIR" || true
cd "$NVM_DIR"
git fetch --all
git checkout `git describe --abbrev=0 --tags --match "v[0-9]*" $(git rev-list --tags --max-count=1)`
@iczero
iczero / scihub-nginx.conf
Last active Dec 12, 2018
Sci-Hub nginx reverse proxy setup
View scihub-nginx.conf
# relevant parts of configuration
upstream scihub {
server 80.82.77.83:443;
server 80.82.77.84:443;
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name sci-hub.yourdomain.comt;
You can’t perform that action at this time.