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
var deleteall = async function() { | |
// The position of the "Delete" menuitem is +1 on search pages | |
position = 0 + document.location.toString().includes("search?q=") | |
console.log("Undoing Retweets") | |
// Keep iterating until there's no retweet to do | |
while (retweet = document.querySelector('[data-testid="unretweet"]')) { | |
console.log(retweet) | |
retweet.click(); | |
// Sleep a bit to make sure the confirm prompt appeared | |
await new Promise(r => setTimeout(r, 1000)); |
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
app.use((err, req, res, next) => { | |
if (res.headersSent) next(err); | |
const code = err.status || 500; | |
const description = err.message; | |
// Regex 500 error to send to Sentry | |
const matchFHErr = /5[0-9][0-9]/g; | |
if (code.toString().match(matchFHErr)) Sentry.captureException(err); | |
// Respond with error | |
res.status(code).json(sendError(code, description)); | |
}); |
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
diskutil eraseDisk JHFS+ MYDISK MBR $disk |
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
git config --global http.sslVerify false |
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
# Replace <sentry_key>, <sentry-url> and <project-id> to formulate your CURL request. Don't forget to add a trailing slash to URL otherwise you'll get wierd CSRF errors! | |
curl -X POST --data '{ "exception": [{ "type": "$ErrorMessage"}] }' -H 'Content-Type: application/json' -H "X-Sentry-Auth: Sentry sentry_version=7, sentry_key=<sentry_key>, sentry_client=raven-bash/0.1" https://<sentry-url>/api/<project-id>/store/ |
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 bash | |
directories=$(find . -mindepth 1 -maxdepth 1 -type d) | |
command="" | |
for d in $directories | |
do | |
file="$d/compose.yml" | |
if [ -f $file ]; | |
then |
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
*{background:#5d3a3a;margin:0}p{width:200;height:200;background:#b5e0ba} |
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
version: '3.6' | |
services: | |
zookeeper: | |
image: confluentinc/cp-zookeeper:latest | |
ports: | |
- 32181:32181 | |
environment: | |
ZOOKEEPER_CLIENT_PORT: 32181 |
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
FROM centos:centos7 | |
# RUN cd ~ \ | |
# wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "https://download.oracle.com/otn-pub/java/jdk/8u202-b08/1961070e4c9b4e26a04e7f5a083f551e/jre-8u202-linux-x64.rpm" \ | |
# yum -y localinstall jre-8u202-linux-x64.rpm \ | |
# rm ~/jre-8u202-linux-x64.rpm | |
# RUN cd ~ \ | |
# wget -c "http://mirror.centos.org/centos/7/updates/x86_64/Packages/java-1.8.0-openjdk-headless-1.8.0.201.b09-2.el7_6.x86_64.rpm" \ | |
# yum -y --nogpgcheck localinstall java-1.8.0-openjdk-headless-1.8.0.201.b09-2.el7_6.x86_64.rpm \ |
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
// delete tweets. | |
[].slice.call(document.getElementsByClassName('js-actionDelete')).map(tweet => { | |
tweet.childNodes[1].click() | |
document.getElementsByClassName('delete-action')[0].click() | |
}) | |
// un-retweet. | |
[].slice.call(document.getElementsByClassName('ProfileTweet-actionButtonUndo')).map(retweet => { | |
retweet.click() | |
document.getElementsByClassName("js-close")[0].click() |