Skip to content

Instantly share code, notes, and snippets.

View thefloodshark's full-sized avatar

theFloodShark thefloodshark

View GitHub Profile
@thefloodshark
thefloodshark / .ahk
Created April 2, 2018 09:57
Special Keys - Keybind Bodies of Text
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
~SC027 & SC028::
Send {Backspace}
clipboard = ; send this text to the clipboard:
(
@thefloodshark
thefloodshark / .ahk
Created April 2, 2018 09:58
Monitor Off
#z::
Sleep, 200
SendMessage,0x112,0xF170,2,,Program Manager
return
~#!x::Suspend
@thefloodshark
thefloodshark / .js
Created April 2, 2018 07:41
Tampermonkey Userscript - Keybind Numbered Google Results Select
// ==UserScript==
// @name Google digits
// @include https://www.google.tld/*
// @run-at document-start
// ==/UserScript==
// only work on search pages with #q= &q= ?q=
if (location.href.match(/[#&?]q=/)) {
window.addEventListener('keydown', function(e) {
var digit = e.keyCode - 48;
@thefloodshark
thefloodshark / cmd_repo.bat
Last active October 20, 2021 09:04
Automated Update Github Repo Batch Script - run with AHK
pushd D:\YOUR_FOLDER\username.github.io
git add .
git commit -m auto
git push
#Selenium written in Python
#Automates Bing searches
#Work in progress - streamline with dictionary/tuple/list/keys
#Uses Chrome and Chromedriver to run random Bing searches
#change timings and search queries to your liking
import time
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.keys import Keys
#Selenium written in Python
#Changes the user agent to search Bing as if on a mobile device (from the desktop)
#Problems with finding element and clicking to log into Bing ; Python mouse click events can fix this
#Work in progress - can likely replace the first sign-in attempt with a mouse click event and then remove the next bit of code that opens the sidebar and signs in
#Can streamline with dictionary/list/tuple/keys
#old method used fake_useragent
import time
from selenium import webdriver
from pynput.mouse import Button, Controller
@thefloodshark
thefloodshark / Autoclicklink.js
Created March 13, 2019 01:53
Autoclick Link with Specified Text
@thefloodshark
thefloodshark / Caseautofill.js
Last active October 20, 2021 09:05
Case Insensitive Radio Button Autofiller
// ==UserScript==
// @name Case Insensitive Label-based Radio Button Autofill ("Xabc Yhjk")
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://*.qualtrics.com/*
// @match https://*.surveymonkey.com/*
// @match https://*.surveygizmo.com/*
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js
@thefloodshark
thefloodshark / .py
Created April 3, 2018 04:45
Open List of URLs
import webbrowser
webbrowser.open('https://www.example.com/r/Music/')
webbrowser.open_new_tab('https://www.example2.com/')
webbrowser.open_new_tab('https://www.example3.com/')
webbrowser.open_new_tab('https://www.example4.com/')
@thefloodshark
thefloodshark / .js
Created April 3, 2018 04:35
Automatic Tab Closer Based on URL Text
// ==UserScript==
// @name Autoclose URL
// @namespace Autoclose URL
// @include *
// @grant window.close
// ==/UserScript==
function check_if_should_close(url) {
if (url.match(/yourURLtexthere/))
return true;