Skip to content

Instantly share code, notes, and snippets.

View RayBB's full-sized avatar

Raymond Berger RayBB

View GitHub Profile
@RayBB
RayBB / ECEvents.json
Last active December 18, 2016 00:53
List of events at Eckerd
[{"id":"1451404584873782","interested_count":0,"is_canceled":false,"attending_count":0,"category":"LECTURE","cover":{"offset_x":0,"offset_y":50,"source":"https://scontent.xx.fbcdn.net/v/t31.0-8/s720x720/15000620_1453273658034429_3456366917166415352_o.jpg?oh=b539540f54a6e54be3aac589c9811e47&oe=58E5DC33","id":"1453273658034429"},"description":"Join us to hear political experts, Dr. Susan A. MacManus, Distinguished Professor at the University of South Florida, and Adam C. Smith, Political Editor of the Tampa Bay Times, give their insights on this year's Presidential Election.","end_time":"2016-11-10T17:00:00-0500","maybe_count":0,"name":"Experts Review the 2016 Presidential Election","owner":{"name":"ASPEC at Eckerd College","id":"162658097095998"},"place":{"name":"ASPEC at Eckerd College","location":{"city":"Saint Petersburg","country":"United States","latitude":27.71303319705,"longitude":-82.692321538925,"state":"FL","street":"4200 54th Ave S","zip":"33711"},"id":"162658097095998"},"start_time":"2016-11-10T16:
;; Basically, on z keypress, this program coppies selected text, alt tabs, pastes, and switches back
;; Need Auto hotkey to run this
z::
SendEvent {Ctrl Down}c{Ctrl Up}
Sleep, 100
Send, {ALT DOWN}{TAB}{ALT UP}
Sleep, 100
Send, ^V
Send, {ALT DOWN}{TAB}{ALT UP}
Return
@RayBB
RayBB / MotoE_Unlocker.bat
Last active December 19, 2016 20:42
Batch File to Automate Unlocking of Verizon Moto E
@echo off
echo Please insert sim card and connect device via usb before hitting enter
timeout /t -1
adb wait-for-device
adb shell settings put global airplane_mode_on 1
adb shell am broadcast -a android.intent.action.AIRPLANE_MODE
@RayBB
RayBB / FBAProfit.js
Created June 7, 2017 21:40
Calculates total profit from Amazon FBA
/*
Instructions:
Go to Amazon Seller Central > Invintory > Manage FBA Invintory
Under Filters, set status = active
Set results to page to necessicary size
*/
///FBA Value Calculator!
let prices = [...document.querySelectorAll('.a-input-text.main-entry.mt-icon-input.mt-input-text')].map(function(currentValue){return currentValue.value*1;})
@RayBB
RayBB / facebookFriends.js
Created June 24, 2017 04:00
Counts all the friends your friends have on facebook.
/*
Just go to your facebook profile, hit the friends tab.
Scroll all the way down until all your friends are loaded
Then past this command into the browser
Note: This only counds the people that have a status under their name listing the number of friends.
Like so:
First Last
1,335 friends
@RayBB
RayBB / chrome-autoscroll-bookmarklet.js
Last active February 9, 2023 18:36 — forked from lorenjohnson/chrome-autoscroll-bookmarklet.js
Auto Scroll Bookmarklet (for Chrome)
javascript:(function(window, document) {
var isScrolling, scrollTimeout;
var defaultScrollSpeed = 50;
var scrollSpeed = 50;
var adjustIncrement = 2;
var jumpIncrement = 50;
function start() {
window.addEventListener('keydown', keyPressed);
window.addEventListener('keyup', keyReleased, false);
@RayBB
RayBB / updatePage.js
Created August 24, 2017 22:21
Automatically updates any page every at whatever
var delay = 1; // seconds
var update = function(delay) {
var request = new XMLHttpRequest();
request.open('GET', window.location.href, true);
request.onload = function() {
document.body.innerHTML = this.response;
setTimeout(() => update(delay), (delay | 1) * 1000);
};
request.send();
};
@RayBB
RayBB / acm.js
Created November 1, 2017 15:03
Adds citation count next to references and citations on ACM Digital Library
/* Created by Ray Berger https://github.com/RayBB/
This program works on the ACM digital library.
When looking looking at the references or cited by tab for any article, simply paste this code into the console.
It will put the number of citations next to each refence.
*/
function getURL(url, row) {
var request = new XMLHttpRequest();
request.open("GET", url, true);
#!/bin/bash
echo "this must be run as sudo to work"
for (( ; ; ))
do
if ping -q -c 1 -W 1 208.67.222.222 >/dev/null; then
echo "IPv4 is up"
sleep 60
else
echo "IPv4 is down, restarting network service"
sudo service network-manager restart
@RayBB
RayBB / githubUnwatcher.js
Last active February 14, 2020 07:27
Unwatched all the repos you were automatically subscribed to when you joined an organization.
// Works on https://github.com/watching
// Just edit the variable below, got to the page above, and paste this code in the console.
// Will need to refresh and repeat if more than 100 repos
let unsubFrom = "buzzfeed"; // Case sensitive
document.querySelectorAll('.Box-row').forEach(entry => {
if (entry.innerText.includes(unsubFrom)){
entry.querySelector('button').click()
}
})