Skip to content

Instantly share code, notes, and snippets.

View TSedlar's full-sized avatar

Tyler Sedlar TSedlar

View GitHub Profile
@TSedlar
TSedlar / PageScrollHistory.js
Last active October 30, 2019 21:53
PageScrollHistory UserScript
// ==UserScript==
// @name Page Scroll History
// @namespace http://tampermonkey.net/
// @version 1.2.2
// @description Page Scroll History
// @author Tyler Sedlar
// @match *://www.tdev.top/eBooks/*
// @grant GM.registerMenuCommand
// @grant GM.getValue
// @grant GM.setValue
package rs.toolkit.util.jre;
import rs.toolkit.util.OperatingSystem;
import rs.toolkit.util.io.Internet;
import rs.toolkit.util.io.InternetCallback;
import rs.toolkit.util.io.Untar;
import java.io.File;
import java.io.IOException;
import java.net.HttpURLConnection;
@TSedlar
TSedlar / NHK-Romaji.js
Created January 7, 2019 04:39
Changes NHK furigana to romaji upon clicking them
// ==UserScript==
// @name Romaji Tooltip
// @version 1
// @grant none
// @match https://www3.nhk.or.jp/*
// @require https://code.jquery.com/jquery-3.3.1.min.js
// @require https://gist.githubusercontent.com/TSedlar/7a8090760a05c5ff0b7f82edd88ab001/raw/639090330cf619bc7f2cd1497579608afe140a71/Japanese.js
// ==/UserScript==
const translated = {};
@TSedlar
TSedlar / topics.md
Created December 23, 2018 00:13
Bytecode Topics

Opaque Predicates

Meaning

In computer programming, an opaque predicate is a predicate—an expression that evaluates to either "true" or "false"—for which the outcome is known by the programmer a priori, but which, for a variety of reasons, still needs to be evaluated at run time. Opaque predicates have been used as watermarks, as it will be identifiable in a program's executable. They can also be used to prevent an overzealous optimizer from optimizing away a portion of a program. Another use is in obfuscating the control or dataflow of a program to make reverse engineering harder.

Documents

Sources

// ==UserScript==
// @name YouTube Sidebar Playlist Sorter (A-Z)
// @version 1.0.0
// @author Tyler Sedlar
// @description Sorts the YouTube sidebar playlists alphabetically
// @match http://*.youtube.com/
// @match https://*.youtube.com/
// @match http://*.youtube.com/*
// @match https://*.youtube.com/*
// ==/UserScript==
@TSedlar
TSedlar / CMakeLists.txt
Created September 22, 2018 03:59
CMake & Make VSCode setup
cmake_minimum_required(VERSION 3.2)
include("cmake/HunterGate.cmake")
HunterGate(
URL "https://github.com/ruslo/hunter/archive/v0.10.9.tar.gz"
SHA1 "53b198e364dc7bc8360fc545f798563229bd7e20"
)
hunter_add_package(Boost COMPONENTS regex system filesystem)
find_package(Boost CONFIG REQUIRED regex system filesystem)
@echo off
if not defined in_subprocess (cmd /k set in_subprocess=y ^& %0 %*) & exit
SetLocal EnableDelayedExpansion
set worlds=2 3 4 5 6 7 9 10 11 12 13 14 17 18 19 20 21 22 27 28 29 30 33 34 36 38 41 42 43 44 46 49 50 51 53 54 58 59 60 61 62 65 66 67 68 69 70 73 74 75 76 77 78 86
set pos=0
set found=false
/**
* @author Tyler Sedlar
* @since 11/9/13
*/
public class Mask extends BigInteger {
private static final long serialVersionUID = 1L;
public static final Mask NOP = of(Opcodes.NOP);
public static final Mask ACONST_NULL = of(Opcodes.ACONST_NULL);
@TSedlar
TSedlar / amplify.js
Last active April 23, 2016 19:38
Amplify MOOC/Edhesive Solver
/**
* @author <a href="mailto:sedlarizona@gmail.com">Tyler Sedlar</a>
* @since 11/3/14
*/
var code = function() {
function generate(regex) {
var validEnd = regex.substring(regex.length - 1) !== "/";
var type = regex.substring(regex.length - 1);
if (!validEnd) {
@TSedlar
TSedlar / clippy.sh
Created August 19, 2014 01:30
Bash script for uploading screenshots to imgur or clipboard content to pastie
#!/bin/bash
function get_clipboard_content {
xclip -selection c -o
}
function upload_pastie {
local lang="plain_text"
local content=$(get_clipboard_content)
local private=1