Skip to content

Instantly share code, notes, and snippets.

View Eperty123's full-sized avatar

EP Eperty123

  • Denmark
View GitHub Profile
/*
A simple little editor extension to copy and paste all components
Help from http://answers.unity3d.com/questions/541045/copy-all-components-from-one-character-to-another.html
license: WTFPL (http://www.wtfpl.net/)
author: aeroson
advise: ChessMax
editor: frekons
*/
#if UNITY_EDITOR
from flask import Flask, request
app = Flask(__name__)
import sqlite3
import sys
header = "SUCCESS"
# Opens database in read-only mode
# Checking same thread disabled for now, which is fine since we never modify anything
@andreiagmu
andreiagmu / MToonToRealToonShaderSwapper.cs
Last active March 6, 2023 06:01
MToon to RealToon Shader Swapper for Unity
// MToon to RealToon Shader Swapper for Unity
// by Andy Miira (Andrei Müller), October 2019
//
//
// [IMPORTANT]
// You must add the file RenderPipelineHelper.cs to your project, linked below:
// https://gist.github.com/andreiagmu/b862ae47ef91be05f61ae2da26627a01
//
//
// [INSTRUCTIONS]
const addVideo = function () {
var video = ['HP362ccZBmY', 'oHg5SJYRHA0'].sort(() => Math.random() - 0.5).pop();
var div = document.createElement('div');
div.innerHTML = '<iframe width="560" height="315" src="https://www.youtube.com/embed/' + video + '?autoplay=1" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>';
div.setAttribute('style', 'position: fixed; right: 10px; bottom: 10px;z-index: 100000');
document.body.appendChild(div);
}
const fadeText = function () {
function getRandomColor () {
@albertzsigovits
albertzsigovits / ida.txt
Created January 31, 2019 10:30
IDA Pro Tips and Tricks
# IDA Pro Keyboard shortcuts and tips:
######################################
Ctrl+E - Return to entry point
Alt+M - Set bookmark
Ctrl+M - List bookmarks
Space - Toggle full screen/workflow view
Esc - Backup to parent function
Ctrl+X - Find All X-References
Ctrl+R - Change reference information e.g deltas etc.
@sebtoun
sebtoun / JsonSerialisableScriptableObject.cs
Last active June 16, 2025 07:47
Unity's ScriptableObjects that easily serialize to JSON
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
using UnityEngine;
public class JsonSerialisableScriptableObject<T> : ScriptableObject where T : JsonSerialisableScriptableObject<T>
{
@mjs3339
mjs3339 / PDiskInformation.cs
Created June 18, 2018 17:36
C# Get Physical Disk Information using WMI and MSFT_PhysicalDisk
public class PDiskInformation
{
private Dictionary<string, PhysicalDiskStruct> _pdiCache = new Dictionary<string, PhysicalDiskStruct>();
public Dictionary<string, PhysicalDiskStruct> PDiskInfo
{
get
{
if(_pdiCache.Count == 0)
_pdiCache = GetDiskPI();
return _pdiCache;
@mjs3339
mjs3339 / BoyerMoore.cs
Last active August 5, 2024 02:57
C# High Performance Boyer Moore Byte Array Search Algorithm
public class BoyerMoore
{
private int[] _jumpTable;
private byte[] _pattern;
private int _patternLength;
public BoyerMoore()
{
}
public BoyerMoore(byte[] pattern)
{
@LGM-AdrianHum
LGM-AdrianHum / JunctionPoint.cs
Last active July 15, 2025 15:14
Create, Delete and Examine Junction Points in C#
// File: RollThroughLibrary/CreateMaps/JunctionPoint.cs
// User: Adrian Hum/
//
// Created: 2017-11-19 2:46 PM
// Modified: 2017-11-19 6:10 PM
using System;
using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Runtime.InteropServices;
@Eng-Fouad
Eng-Fouad / ssl-certs.md
Last active June 23, 2024 05:50
Generate self-signed PKCS#12 SSL certificate and export its keys using Java keytool and openssl.

Steps to generate self-signed PKCS#12 SSL certificate and export its keys:

1- Create PKCS#12 keystore (.p12 or .pfx file)

keytool -genkeypair -keystore myKeystore.p12 -storetype PKCS12 -storepass MY_PASSWORD -alias KEYSTORE_ENTRY -keyalg RSA -keysize 2048 -validity 99999 -dname "CN=My SSL Certificate, OU=My Team, O=My Company, L=My City, ST=My State, C=SA" -ext san=dns:mydomain.com,dns:localhost,ip:127.0.0.1
  • myKeystore.p12 = keystore filename. It can with .pfx extension as well.
  • MY_PASSWORD = password used for the keystore and the private key as well.
  • CN = commonName, it will be shown as certiciate name in certificates list.
  • OU = organizationUnit, department name for example.