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
// Head over to https://github.com/rigwild/anons-secret-nft :) |
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
html { | |
max-width: 70ch; | |
padding: 1rem; | |
margin: auto; | |
line-height: 1.75rem; | |
font-size: 1rem; | |
font-family: "Open Sans", Arial, sans-serif; | |
} | |
h1, h2, h3, h4, h5, h6 { |
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
/// <reference path="./types.ts" /> | |
// @ts-check | |
'use strict' | |
/** @param {string}str */ | |
const strToUint8Array = str => new TextEncoder().encode(str) | |
/** @param {Uint8Array}uint8Array */ |
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
#!/bin/bash | |
# Check if script is ran by root user -> exit | |
if [[ $EUID -eq 0 ]]; then echo "This script should not be ran by root!"; exit 1; fi | |
# Stop script on error | |
set -e | |
set -o pipefail | |
sudo apt update |
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
export type Task<F extends (...args: any) => any> = { thisArg: any; fn: F; args: Parameters<F> } | |
/** | |
* Debounced task queue, will skip function calls if serialized arguments were already seen recently | |
* | |
* @author rigwild <[email protected]> (https://github.com/rigwild) | |
* @see https://gist.github.com/rigwild/02c28eb3e73075804cb1002a808dc343 | |
*/ | |
export class DebouncedTasksQueue { | |
private debounceMs: number = 10000 |
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
#!/usr/bin/env zx | |
const download = async () => { | |
await $`wget -nv -O - https://thispersondoesnotexist.com/image > file.jpg` | |
const sha1 = (await $`sha1sum file.jpg`).toString().split(' ')[0] | |
const exists = (await $`ls`.pipe(nothrow($`grep ${sha1}.jpg`))).toString().trim() !== '' | |
if (!exists) { | |
$`mv file.jpg ${sha1}.jpg` | |
return 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
import faker from 'faker' | |
import { spawn, Pool, Worker } from 'threads' | |
let count = 1 | |
const rand = (min: number, max: number) => Math.floor(Math.random() * (max - min + 1)) + min | |
;(async () => { | |
const pool = Pool(() => spawn(new Worker('./paypalPhishingSpam.worker.mjs'))) |
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
import { TwitterClient } from 'twitter-api-client' // yarn add twitter-api-client | |
// You can use this project to get your user token: | |
// To see your token, add `console.log(tokens)` in `OAuth Step 3` in `express/src/index.js` | |
// https://github.com/QuodAI/tutorial-react-twitter-api-login | |
const twitterClient = new TwitterClient({ | |
apiKey: '', // app client id | |
apiSecret: '', // app client secret | |
accessToken: '', // user access token |
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
# /etc/squid/squid.conf | |
# http_access allow all | |
http_port 59371 | |
coredump_dir /var/spool/squid3 | |
refresh_pattern ^ftp: 1440 20% 10080 | |
refresh_pattern ^gopher: 1440 0% 1440 | |
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0 | |
refresh_pattern (Release|Packages(.gz)*)$ 0 20% 2880 |
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
# yarn global add localtunnel | |
lt --port 8080 --subdomain mytestsubdomain --local-host localhost --print-requests |