Skip to content

Instantly share code, notes, and snippets.

Shader "Hidden/JumpFloodOutline"
{
Properties
{
_MainTex ("Texture", 2D) = "white" {}
}
SubShader
{
Tags { "PreviewType" = "Plane" }
Cull Off ZWrite Off ZTest Always
@tsweeper
tsweeper / starship.toml
Last active December 27, 2021 23:12
merged and tweaked starship prompt configuration file
# prompt configurations
[character]
success_symbol = "[➜](bold green) "
error_symbol = "[✗](bold red) "
# Nerd Font Symbols combined with Bracketed Segments base on official presets
# https://starship.rs/presets
[aws]
format = '\[[$symbol($profile)(\($region\))(\[$duration\])]($style)\]'
symbol = " "
using UnityEngine;
using UnityEngine.UI;
public class SpeedLabelSetter : MonoBehaviour
{
private Text _text;
public int valueIndex = 3;
private readonly float[] _values = {
0.7f,
0.8f,
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;
@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"
@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 / 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 / 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 / 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 / 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