Skip to content

Instantly share code, notes, and snippets.

@tsweeper
tsweeper / youtube-dl_here.reg
Last active August 15, 2019 09:46
Windows Explorer shell command registry for youtube-dl.exe using clipboard URL
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\Background\shell\youtube-dl]
@="youtube-dl here"
[HKEY_CLASSES_ROOT\Directory\Background\shell\youtube-dl\command]
; requires Powershell 6 with ClipboardText module installed.
; Install-Module -Name ClipboardText
; https://www.powershellgallery.com/packages/ClipboardText
@="pwsh.exe -NoExit -Command {$f=\"F:\\tools\\youtube-dl.exe\";$args=Get-ClipboardText;& $f $args}"
// ==UserScript==
// @name marumaru helper
// @namespace http://tampermonkey.net/
// @version 1.0
// @description delete ads from marumaru.in
// @author Simon tsweeper Lee
// @match *://marumaru.in/*
// @match *://wasabisyrup.com/*
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js
// @require https://gist.github.com/raw/2625891/waitForKeyElements.js
@tsweeper
tsweeper / android-captive.sh
Created August 12, 2018 12:10
Overrides the captive portal settings of Android in the People's Republic China Mainland
#!/usr/bin/env sh
adb shell settings put global captive_portal_fallback_url http://g.cn/generate_204
adb shell settings put global captive_portal_http_url http://www.google.cn/generate_204
adb shell settings put global captive_portal_https_url https://www.google.cn/generate_204
adb shell settings put global captive_portal_other_fallback_urls http://www.qualcomm.cn/generate_204
@tsweeper
tsweeper / MSX_EditorUser.properties
Created December 21, 2018 00:55
Customized Maxscript Editor Dark Scheme (fork from DarkScintilla)
# DarkScintilla: Maxscript Editor dark scheme
# http://www.scriptspot.com/3ds-max/scripts/darkscintilla-maxscript-editor-dark-scheme
# change Consolas to Fira Code https://github.com/tonsky/FiraCode
# codepages
code.page=65001
character.set=204
# has no effect in 3ds Max's (old) Scintilla version
find.use.strip=1
@tsweeper
tsweeper / manamoa.userstyles.css
Last active August 7, 2019 17:53
monokai css userstyle for manamoa.net
/* ==UserStyle==
@name manamoa.net
@namespace github.com/openstyles/stylus
@version 1.0.0
@description A new userstyle
@author Me
==/UserStyle== */
@-moz-document regexp("https://manamoa*.net/.*") {
/* Insert code here... */
body, div, header, a, table, th, tr, td, .wrapper {
@tsweeper
tsweeper / canvas2image.js
Created August 27, 2019 10:54
Convert and extract canvas contents into image
/// Convert canvas content into image.
/// Usage: Run this script in console.
/***************************************************************
* Warning Notice
*
* This script is provided for EDUCATIONAL PURPOSES ONLY.
* Do NOT use this script for illegal or copyright infringement activities.
*
* This script is free software; you can redistribute it and/or modify
@tsweeper
tsweeper / GenerateMaxscriptAPI.ms
Last active November 1, 2024 01:19
Generate a file containing the MAXScript function names to activate Auto-Complete feature in MAXScript for 3ds Max
/*
GenerateMaxscriptAPI.ms
Sep 2, 2019
by Simon 'tsweeper' Lee
- Improve file IO speed using .Net class
- File path changed from #maxRoot to #userscripts to avoid previledge problem
- Sorted API list
@tsweeper
tsweeper / listFonts.ps1
Last active December 27, 2019 11:45
Get installed font family names using powershell
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Drawing")
$fonts = (New-Object System.Drawing.Text.InstalledFontCollection)
$fonts.Families.Name
# How to filter using regex?
# $fonts.Families.Name | Select-String -Pattern "F.ra"
using System;
using System.Collections.Generic;
using DG.Tweening;
using LitJson;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
using Vuplex.WebView;
using Vuplex.WebView.Demos;
using UnityEngine;
using UnityEngine.UI;
public class SpeedLabelSetter : MonoBehaviour
{
private Text _text;
public int valueIndex = 3;
private readonly float[] _values = {
0.7f,
0.8f,