Skip to content

Instantly share code, notes, and snippets.

View eviltester's full-sized avatar

Alan Richardson eviltester

View GitHub Profile
@eviltester
eviltester / gist:7262f4d0e8226cd2fa57d750e3faff95
Created June 26, 2019 10:56
simple galaxian game hacks
Found this little Galaxians game which is quite nice and hackable:
http://michal.biniek.pl/games/galaxian.html
~~~~~~~~
var infiniteLivesBot = setInterval(function(){if(oLives.iLives<3){oLives.add();}},1000);
~~~~~~~~
~~~~~~~~
var autofireBot = setInterval(function(){MyShip.shoot();},200)
@eviltester
eviltester / linkchecker.js
Last active January 15, 2024 04:48
link checking from snippets
var links = document.querySelectorAll("a");
var linkReport = [];
var linksChecked=0;
links.forEach(function(link){
var reportLine = {url: link.getAttribute('href'), status:0, redirectedTo: "", message : "", element : link};
linkReport.push(reportLine);
console.log("HEAD " + reportLine.url);
@eviltester
eviltester / FirefoxMarionetteDriverTest.java
Created November 11, 2019 10:57
deprecating marionnette test code
package com.seleniumsimplified.webdriver.drivers;
import com.seleniumsimplified.webdriver.manager.Driver;
import com.seleniumsimplified.webdriver.manager.ProxyPort;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;
import org.openqa.selenium.WebDriver;
//import org.openqa.selenium.firefox.MarionetteDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
@eviltester
eviltester / PortableFirefoxDriverTest.java
Created November 11, 2019 10:59
deprecated portable firefox
package com.seleniumsimplified.webdriver.drivers;
import org.junit.Test;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxBinary;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.firefox.FirefoxOptions;
import org.openqa.selenium.firefox.FirefoxProfile;
import org.openqa.selenium.remote.DesiredCapabilities;
@eviltester
eviltester / _sample.java
Created November 11, 2019 11:43
deprecated example using a firefox plugin
@Test
public void firefoxUseExtensions() throws IOException {
// **************************************************************************
// profile is good for setting preferences and fiddling with browser settings
// **************************************************************************
// Download the extension to a local folder
String s = File.separator;
String extensionPath = System.getProperty("user.dir") +
@eviltester
eviltester / gist:11093f0e4c501a41990e227393184eda
Last active April 24, 2024 11:35
uncheck twitter interests
var timer=100;document.querySelectorAll("div > input[type='checkbox']:checked").forEach((interest) => {setTimeout(function(){interest.click()},timer);timer+=2000;});
var xhttp = new XMLHttpRequest();
xhttp.open("GET","https://bitbloxs.herokuapp.com/boxes?api_key=thisistheapikey");
xhttp.onload = (e)=>{
console.log(xhttp.status);
console.log(xhttp.responseText);
}
xhttp.send(null);
// http://zzzscore.com/1to50/en
function clickAllSquares(){
var clickedCount=0;
for(currentNum=1;currentNum<51;currentNum++){
console.log("processing "+currentNum);
cells = document.querySelectorAll("div#grid div");
for(var cellindex=0;cellindex<cells.length;cellindex++){
var foundInt = parseInt(cells[cellindex].innerText);
if(foundInt==currentNum){
// http://zzzscore.com/1to50/en
function clickAllSquares(){
var clickedCount=0;
for(currentNum=1;currentNum<51;currentNum++){
console.log("processing "+currentNum);
cells = document.querySelectorAll("div#grid div");
for(var cellindex=0;cellindex<cells.length;cellindex++){
var foundInt = parseInt(cells[cellindex].innerText);
if(foundInt==currentNum){
@eviltester
eviltester / gist:42de6e41d2d1cdd591be0fc024f10920
Created May 28, 2020 17:35
play tic tac toe org random bot
// https://playtictactoe.org/
function playGame(){
var restart = document.querySelector("div.restart");
if(restart.style.display=="block"){
restart.click()
}else{
var squares = document.querySelectorAll("div.square > div:not(.x):not(.o)");
var item=Math.floor(Math.random()*squares.length)