Skip to content

Instantly share code, notes, and snippets.

@nedius
nedius / nedius.tagcomplete.plugin.js
Last active January 17, 2024 23:57
Booru style tag autocompletion for cmdr2's Stable Diffusion UI | Ported from DominikDoom/a1111-sd-webui-tagcomplete
// ==UserScript==
// @name Tag Autocomplete
// @version 0.2.1
// @description Booru style tag autocompletion for cmdr2's Stable Diffusion UI | Ported from DominikDoom/a1111-sd-webui-tagcomplete
// @author nedius
// @source https://gist.github.com/nedius/bd5a1af78dc71a762fe76bd6d05631d5
// @info It is not perfect, but it works. There is a lot of unnecessary code that needs to be deleted. I will try to improve it in future.
// Changelog
// 0.2.1
@victornpb
victornpb / deleteDiscordMessages.js
Last active June 27, 2024 21:31
Delete all your messages from DM or Channel in Discord
/*
This file is now hosted here:
https://github.com/victornpb/undiscord
*/
@Toliak
Toliak / encodeString-filesize-fix.lua
Last active February 22, 2020 15:29
MTA encodeString filesize fix
local KEY = "sampletext"
addEventHandler("onResourceStart", resourceRoot, function()
-- ENCODE
local file = File.open("test.txt")
local raw = file:read(file.size)
file:close()
local len = #raw
local lent = {}
@Split82
Split82 / UnityShadersCheatSheet.shader
Created April 17, 2018 10:07
Unity Shaders Cheat Sheet
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)
@squeek502
squeek502 / CMakeLists.txt
Last active October 13, 2022 14:16
Lua 5.3.x Windows CMake build script
project ( lua C )
cmake_minimum_required ( VERSION 2.8 )
include_directories ( src ${CMAKE_CURRENT_BINARY_DIR} )
set ( SRC_CORE src/lapi.c src/lcode.c src/lctype.c src/ldebug.c src/ldo.c src/ldump.c src/lfunc.c src/lgc.c src/llex.c
src/lmem.c src/lobject.c src/lopcodes.c src/lparser.c src/lstate.c src/lstring.c src/ltable.c
src/ltm.c src/lundump.c src/lvm.c src/lzio.c )
set ( SRC_LIB src/lauxlib.c src/lbaselib.c src/lbitlib.c src/lcorolib.c src/ldblib.c src/liolib.c
src/lmathlib.c src/loslib.c src/lstrlib.c src/ltablib.c src/lutf8lib.c src/loadlib.c src/linit.c )
@xvitaly
xvitaly / remove_crw.cmd
Last active March 16, 2024 16:12
Remove telemetry updates for Windows 7 and 8.1
@echo off
echo Uninstalling KB3075249 (telemetry for Win7/8.1)
start /w wusa.exe /uninstall /kb:3075249 /quiet /norestart
echo Uninstalling KB3080149 (telemetry for Win7/8.1)
start /w wusa.exe /uninstall /kb:3080149 /quiet /norestart
echo Uninstalling KB3021917 (telemetry for Win7)
start /w wusa.exe /uninstall /kb:3021917 /quiet /norestart
echo Uninstalling KB3022345 (telemetry)
start /w wusa.exe /uninstall /kb:3022345 /quiet /norestart
echo Uninstalling KB3068708 (telemetry)
@JISyed
JISyed / LoadShaderFromFile.cpp
Created December 7, 2013 04:24
A little helper function to load an OpenGL shader file (can be any text formatted file) to a C-String. The returned string has to be deleted by the caller when not needed anymore. You need: #include <iostream> #include <fstream>
const char* ReadShaderFileToMemory(const char* filePath)
{
const char * shaderFileBuffer = NULL;
std::ifstream inSdrFileStream(filePath);
if(inSdrFileStream)
{
// Get length of shader file by seeking and telling (offset of 0)
inSdrFileStream.seekg(0, inSdrFileStream.end);
unsigned long fileLength = (unsigned long) inSdrFileStream.tellg() + 1;
@brbsh
brbsh / a_oop.inc
Last active August 17, 2022 02:47
It's just an injection of some OOP to PAWN language (adapted to SA-MP)
/*
SA:MP OOP include
Copyright (c) BJIADOKC
*/
#if defined _oop_included
#endinput
#endif
#define _oop_included
@Deco
Deco / deepcopy.lua
Created October 31, 2012 05:38
Lua Non-recursive Deep-copy
--[[ deepcopy.lua
Deep-copy function for Lua - v0.2
==============================
- Does not overflow the stack.
- Maintains cyclic-references
- Copies metatables
- Maintains common upvalues between copied functions (for Lua 5.2 only)
TODO
@kizzx2
kizzx2 / fun.cpp
Created January 11, 2012 14:29
Illustrative C++ Lua binding example/tutorial
// fun.cpp
extern "C"
{
#include <lua.h>
#include <lauxlib.h>
#include <lualib.h>
}
#include <iostream>