Skip to content

Instantly share code, notes, and snippets.

View andymasteroffish's full-sized avatar

Andy Wallace andymasteroffish

View GitHub Profile
var all = document.getElementsByTagName("*");
for (var i=0, max=all.length; i < max; i++) {
console.log("doing "+i+" of "+all.length);
var rect = all[i].getBoundingClientRect();
all[i].style.fontSize = (rect.top * 0.04)+"px";
}
var all = document.getElementsByTagName("*");
window.setInterval(function(){
var deadOne = Math.floor(Math.random()*all.length)
if (all[deadOne] != null){
all[deadOne].parentNode.removeChild(all[deadOne]);
}
}, 40);
var reviewNames = document.getElementsByClassName("customerReviewTitle");
var reviewText = document.getElementsByClassName("content");
var starAreas = document.getElementsByClassName("rating");
//console.log("got "+reviewText.length);
for (var i=0; i < reviewNames.length; i++) {
reviewNames[i].innerHTML = "This is an app.";
}
@andymasteroffish
andymasteroffish / gist:627e22cb7414dc1c786a59f59a14d4c2
Created August 16, 2016 18:59
steamdoesntknowwhatitwants.js
var replaceMessage = "I do not know what I want.";
var replaceMessageHours = 24;
var reviews = document.getElementsByClassName("review_box");
for (var i=0; i < reviews.length; i++) {
console.log("------- "+i+" --------");
//get all divs containing reviews
var recomended = reviews[i].getElementsByClassName("title ellipsis")[0];
@andymasteroffish
andymasteroffish / auto_launch.ahk
Created September 22, 2017 15:47
Autohotkey launch script for Bleep Space
; This is the launch script I'm using for Bleep Space for Death By Audio Arcade
; This script is HEAVILY based on one that Babycastles used. Thanks Babycastles!
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; SETUP
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Game Variables
Game_Path = "C:\Users\bleep\Dropbox\bleep_space_arcade\bin\emptyExample.exe"
Game_Process_ID = BLEEPSPACE
@andymasteroffish
andymasteroffish / exe_launch_function.cpp
Created May 29, 2018 20:18
openFrameworks function to launch an exe used for Dream BoxXx
void ofApp::launchExe(string path) {
if (isFullScreened()) {
ofToggleFullscreen();
}
std::wstring pathTemp = std::wstring(path.begin(), path.end());
LPCWSTR pathLPC = pathTemp.c_str();
string command = "open";
std::wstring commandTemp = std::wstring(command.begin(), command.end());
@andymasteroffish
andymasteroffish / html_launch_function.cpp
Created May 29, 2018 20:27
openFrameworks function to launch a website used for Dream BoxXx
void ofApp::launchWeb(string url) {
if (isFullScreened()) {
ofToggleFullscreen();
}
std::wstring pathTemp = std::wstring(url.begin(), url.end());
LPCWSTR pathLPC = pathTemp.c_str();
ShellExecute(0, 0, pathLPC, 0, 0, SW_MAXIMIZE);
@andymasteroffish
andymasteroffish / dream_launcher_autohotkey.ahk
Last active May 30, 2018 16:56
AutoHotkey script that managed the DreamBoxXx
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; SETUP
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Game Variables
Launcher_Path = "C:/Users/BUBSTAR/Desktop/dream/launcher/dream_launcher.exe"
; General Interface Settings
Start_With_Hidden_Cursor = 1
@andymasteroffish
andymasteroffish / firefox_fullscreen.ahk
Created May 30, 2018 17:19
Fire Fox fullscreener for DreamBoxXx
; some code from https://autohotkey.com/board/topic/17656-breaking-an-infinite-loop-with-keypress/
Loop,
{
;loop waiting for it to launch
Loop,
{
WinWait, Mozilla Firefox, , 5
if ErrorLevel
{
;do nothing
#include <Keyboard.h>
//Code by Mark Kleback for IMS Jam Jam Revolution
//http://www.kleebtronics.com/
//button pins
int button1 = 9;
int button2 = 10;
//storing the button state to detect changes