Skip to content

Instantly share code, notes, and snippets.

View RayBB's full-sized avatar

Raymond Berger RayBB

View GitHub Profile
@RayBB
RayBB / calvinAndHobbes.js
Created April 7, 2020 20:33
Read Calvin and Hobbes without the fuss
/*
I wanted to read calvin and hobbes with the least fuss possible.
That includes:
1. Only see the comic
2. Have keyboard navigation
https://www.gocomics.com/calvinandhobbes/1985/11/18 is the first comic
I like installed the ublock origin extension and added these custom filters
! 4/5/2020 https://www.gocomics.com
@RayBB
RayBB / gixen.js
Last active August 27, 2019 18:40
gixen.com wait bypass
// When logging into gixen.com there is a 60 second delay for free users.
// This script will bypass that if you run it on the page.
document.querySelector("#gbutton").disabled = false;
document.querySelector("#gbutton").click();
@RayBB
RayBB / slackUnread.js
Last active August 20, 2019 21:51
Automatically clicks the show new messages button for unread tab in slack
// Works on pages such as: https://app.slack.com/client/*********/unreads/
/*
Basically just clicks the "X New Messages" button when it pops up :)
*/
setInterval(function(){
let newMessageButton = [...document.querySelectorAll('button')]
.filter(txt => txt.innerHTML.toLowerCase()
.includes('new message'))[0]
if (newMessageButton != null) {
@RayBB
RayBB / qbitorrent.sh
Last active December 31, 2023 23:32
sudo apt-get install \
build-essential \
pkg-config \
automake \
libtool \
libc6-dev \
libboost-dev \
libboost-system-dev \
libboost-chrono-dev \
libboost-random-dev \
@RayBB
RayBB / output.sh
Created March 28, 2019 20:08
How to monitor output of live command and then act on it.
#!/bin/bash
# This script waits for cloud proxy to to start succesfully (by checking logs) and then exits
# All I do is run the command below and then run this script to wait
# cloud_sql_proxy -log_debug_stdout -instances=myinstance -credential_file=s.json > cloud_proxy_log.txt &
timeCount=0
while [ 1 ]
do
if grep -q "Ready for new connections" cloud_proxy_log.txt; then
@RayBB
RayBB / oneplusClicker.js
Created November 5, 2018 02:17
Automatically clicks stuff for the OnePlus clicker contest
const socket = new WebSocket('wss://socket-unlock.oneplus.com/socket.io/?EIO=3&transport=websocket');
const username = "raybb"
let curCounter = 420;
let messagesSent = 0;
let messagesToSend = 10000;
let maxMessageDelayMS = 500;
// Connection opened
socket.addEventListener('open', function (event) {
console.log("opened");
socket.send('420["authenticate user",{"username":"' + username + '","token":"ff45fb994e3124a5e0ce7bf7f27745dcbe62e71275532f982498b798","squad":"","locale":"en-gb","count":100000,"csrf":"0xsn5yq9SAb65OvTXDl3OjzRoVPgr1zVvDtzoVR4ZhjdptbHClRSVaSJDXKwXy8b"}]');
@RayBB
RayBB / oneplusClicker.sh
Created November 4, 2018 23:55
Automatically clicks stuff
#!/bin/sh
# Usage: ./onePlusClicker.sh 15
# a simple tool to automate clicking. Script takes # of clicks (which will be multiplied by ClicksPerLoop) as an argument
# You must set the following 5 variables for your computer before running
# The first four numbers are to set the bounds of where the program should click
# ClicksPerLoop is how many times it will click on each random spot generated
XMIN=550
XMAX=810
YMIN=260
@RayBB
RayBB / dragonRemover.js
Created September 17, 2018 02:07
Removes hatched dragons from valleysherwood
// Works on http://valleysherwood.com/views/
// All you have to do is past this in the console (while on the top frame) and run it
var images = document.querySelectorAll('iframe')[0].contentWindow.document.querySelectorAll('img');
var count = 0;
for (let i = 0; i < images.length; i++){
let cur = images[i];
if(cur.width > 61){
let code = cur.src.split("/")[4];
count++;
removeDrag(code);
@RayBB
RayBB / update_chrome.sh
Created September 8, 2018 17:56
Update Google Chrome (and Beta) on Solus
#!/bin/bash
# This is a script ot update chrome and chrome beta on Solus without using the software center
eopkg bi --ignore-safety https://raw.githubusercontent.com/solus-project/3rd-party/master/network/web/browser/google-chrome-stable/pspec.xml
eopkg bi --ignore-safety https://raw.githubusercontent.com/solus-project/3rd-party/master/network/web/browser/google-chrome-beta/pspec.xml
eopkg it google-chrome-*.eopkg;sudo rm google-chrome-*.eopkg
while true
do
d=`date`
volume=`osascript -e 'get volume settings'`
echo -e "$d\t$volume"
echo -e "$d\t$volume" >> soundlog.txt
sleep 60
done