Skip to content

Instantly share code, notes, and snippets.

View vieruuuu's full-sized avatar
💭
it g ma

vieruuuu

💭
it g ma
View GitHub Profile
@himmelmaus
himmelmaus / thanos_sort.py
Created March 25, 2019 01:20
A quick implementation of the thanos sort algorithm, removing half of the array's elements at a time until the array is sorted
from random import randint
def thanos_sort(array):
while not is_sorted(array):
target_length = int(len(array)/2)
while len(array) > target_length:
del array[randint(0, len(array)-1)]
return array
def is_sorted(array):
@lmj0011
lmj0011 / rejson-for-ubuntu.md
Last active August 30, 2023 05:50
Building and Loading the ReJSON v1 Module on Linux Ubuntu 16.04 for Redis

make sure you have at least redis v4.0+

redis-server --version

redis-cli --version

install the build-essential package

apt-get install build-essential

@tegansnyder
tegansnyder / Preventing-Puppeteer-Detection.md
Created February 23, 2018 02:41
Preventing Puppeteer Detection

I’m looking for any tips or tricks for making chrome headless mode less detectable. Here is what I’ve done so far:

Set my args as follows:

const run = (async () => {

    const args = [
        '--no-sandbox',
        '--disable-setuid-sandbox',
        '--disable-infobars',
@duncansmart
duncansmart / httpget.js
Created June 20, 2013 09:42
Download a file with Windows Script Host
// httpget.js: download a file (Windows Script Host)
// usage: cscript httpget.js <url> <file>
(function() {
if (WScript.Arguments.Length != 2) {
WScript.Echo("Usage: httpget.js <url> <file>")
WScript.Quit(1)
}
var url = WScript.Arguments(0)