Skip to content

Instantly share code, notes, and snippets.

View eviltester's full-sized avatar

Alan Richardson eviltester

View GitHub Profile
@eviltester
eviltester / format web pages for readability
Created June 16, 2020 17:35
right click, inspect, find <body>, paste this into the element style
color: black !important;
background: white !important;
font-size: 2em !important;
font-family: sans-serif !important;
// 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){
var zTypeBotAlphaChars = "abcdefghijklmnopqrstuvwxyz";
var zTypeBotCharToType = 0;
ztypebot = setInterval(function() {
ig.game.shoot(
zTypeBotAlphaChars.charAt(zTypeBotCharToType));
zTypeBotCharToType = (zTypeBotCharToType +1)%26;
}
, 100);
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);
@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 / 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 / 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 / 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 / gist:8405b63339acdf61a68bb8c128815c97
Created December 11, 2017 10:25
Delete Todo Items in the TodoMVC application
for (x = app.todos.models.length - 1; x >= 0; x--) {
app.todos.models[x].destroy()
}