This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const getRandomizedBoxes = ()=>{ | |
const getRandomInt = (min,max)=>{ | |
min = Math.ceil(min); | |
max = Math.floor(max); | |
return Math.floor(Math.random() * (max - min) + min); | |
//The maximum is exclusive and the minimum is inclusive | |
} | |
const boxes = Array(100); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Force highest resolution on Reddit | |
// @namespace http://tampermonkey.net/ | |
// @version 0.2 | |
// @description Parses the mpd file sent to reddit's video player and removes all but the highest resolution representations for each video period | |
// @author x0a | |
// @run-at document-start | |
// @match https://www.reddit.com/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=reddit.com | |
// @grant none |
This file has been truncated, but you can view the full file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.WSAvcPlayer = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){ | |
(function (__dirname){ | |
((function(root,factory){if(typeof define==="function"&&define.amd){define([],factory)}else if(typeof exports==="object"){module.exp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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. | |
Shift:: | |
if WinExist("ahk_class Qt5QWindowToolSaveBits ahk_exe Communicator.exe") { | |
WinActivate, ahk_class Qt5QWindowToolSaveBits ahk_exe Communicator.exe | |
Send, `t`t{Enter} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Place into the location of your Popcorn-Time installation and run | |
desktop_file="Popcorn-Time.desktop" | |
icon=`readlink -f ./src/app/images/icon.png` | |
binary=`readlink -f ./Popcorn-Time` | |
cwd=`readlink -f .` | |
echo "[Desktop Entry]" > $desktop_file |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
server="securitysystem" # my router-defined hostname for my dvr, use ip instead | |
port=8000 | |
res_x=960 # cam resolution, mine is 960H grabbed from running show_cam once w/o -really-silent and watching the output | |
res_y=480 | |
cams=(1 3 4) #show cams 1, 3, and 4, skipping 2 since mine isn't connected | |
function get_current_workspace() { | |
workspace=`wmctrl -d | grep '*' | cut -d ' ' -f1` | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){ | |
if("onbeforescriptexecute" in document) return; // Already natively supported | |
let scriptWatcher = new MutationObserver(mutations => { | |
for(let mutation of mutations){ | |
for(let node of mutation.addedNodes){ | |
if(node.tagName === "SCRIPT"){ | |
let syntheticEvent = new CustomEvent("beforescriptexecute", { | |
detail: node, | |
cancelable: true |