Skip to content

Instantly share code, notes, and snippets.

@curiouspers
curiouspers / ToggleTest.shader
Created May 7, 2021 07:35 — forked from keijiro/ToggleTest.shader
Shows how to use the Toggle material property drawer in a shader. See the reference manual for further details: http://docs.unity3d.com/ScriptReference/MaterialPropertyDrawer.html
Shader "ToggleTest"
{
Properties
{
[Toggle(FILL_WITH_RED)]
_FillWithRed ("Fill With Red", Float) = 0
}
SubShader
{
Pass
Shader "Name" {
Properties {
_Name ("display name", Range (min, max)) = number
_Name ("display name", Float) = number
_Name ("display name", Int) = number
_Name ("display name", Color) = (number,number,number,number)
_Name ("display name", Vector) = (number,number,number,number)
/*
add this lines as bookmarklet:
javascript:(function(){
function $(sel){ return document.querySelector(sel)};
$('#header').style.display = "none";
$('.shaderInfoA').style.display = "none";
$('#shaderDescription').style.display = "none";
$('.block1').style.marginTop = "-28px";
$('#shaderPublished').style.marginTop = "-20px";
// goto inventory, press f12, paste code, enter
var gamesToHide = new Array("NEKOPARA", "Ultimate Arena");
ShowTagFilters();
document.getElementsByClassName("econ_tag_filter_collapsable_tags_showlink whiteLink")[0].click();
var labels = document.getElementsByClassName("econ_tag_filter_category")[1].getElementsByClassName("econ_tag_filter_label");
for (var i = 0; i < labels.length; i++) {
var j = 0,
skip = false;
@curiouspers
curiouspers / SteamSearchMany.user.js
Last active July 11, 2016 02:41
Search games by list of titles on Steam
// ==UserScript==
// @name Steam Search Many
// @namespace http://tampermonkey.net/
// @version 0.2
// @description It will update from time to time.
// @author Curiouspers
// @include http://store.steampowered.com/*
// @include https://store.steampowered.com/*
// @updateURL https://gist.githubusercontent.com/curiouspers/aae6a24df7591a0e3735a4b24e91001d/raw/SteamSearchMany.user.js
// @grant none
// Calculates overall summs of income from trading on steam and outcome on presents and games/movies
// USAGE: open https://store.steampowered.com/account/history/
// scroll page all the way down to bottom
// Press F12, copy\paste this to console, and press Enter
var type = $$('.wht_type');
var sum = 0,
sumPresents = 0,
sumBuy = 0,
sumIngame = 0;
// ==UserScript==
// @name Notabenoid - Stardew Valley - Translation Checker
// @namespace NSVTranslationChecker
// @description Автоматическая проверка перевода Stardew Valley на notabenoid.org
// @include http://notabenoid.org/book/62965/*
// @version 1.0.1.4
// @grant none
// @require https://raw.githubusercontent.com/jeresig/jquery.hotkeys/master/jquery.hotkeys.js
// @updateURL https://gist.githubusercontent.com/WarFollowsMe/6d7f80ce48bce270b93f16c67e87de2d/raw/Notabenoid_-_Stardew_Valley_-_Checker_Orfo.user.js
// ==/UserScript==
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class GenericPoolScript : MonoBehaviour {
/* Generic pool script for Unity
*
* TIP: best to use it with willGrow = false
* and generate all objects that you need at the beginning
@curiouspers
curiouspers / HelloLingo_smiles_bookmarklet.js
Last active March 28, 2016 14:01
add emoji to hellolingo.com
/*
add this line as bookmarklet:
javascript:(function(){ jQuery('body').append('<script type="text/javascript" src="https://rawgit.com/curiouspers/370714666e341c85d2bb/raw/HelloLingo_smiles_bookmarklet.js"></script>'); })();
HOWTO IN PUCTURES:
https://www.dropbox.com/s/qzwo2i5xe6o2acx/hellolingo_emoji.gif?dl=0
then open any chat at hellolingo.com, and press on bookmarklet you just created
*/
var $j = jQuery;
@curiouspers
curiouspers / modal.css
Created January 28, 2016 11:17
css3 blur page on modal open
body.somemodal_modal-open > * {
filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'blur\'><feGaussianBlur stdDeviation=\'6\'/></filter></svg>#blur");
-webkit-filter: blur(6px);
}