This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Sirenix.OdinInspector; | |
using Unity.Cinemachine; | |
using UnityEngine; | |
using static Unity.Cinemachine.CinemachineCore; | |
namespace Assets | |
{ | |
/// <summary> | |
/// Cinemachine extension that locks the camera position along the X and Y axes. | |
/// </summary> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
using System.Linq; | |
using System.Reflection; | |
using UnityEditor; | |
using UnityEngine; | |
using UnityEngine.Rendering.Universal; | |
[RequireComponent(typeof(CompositeCollider2D))] | |
public class ShadowCaster2DGenerator : MonoBehaviour | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;= @echo off | |
;= rem Call DOSKEY and use this file as the macrofile | |
;= %SystemRoot%\system32\doskey /listsize=1000 /macrofile=%0% | |
;= rem In batch mode, jump to the end of the file | |
;= goto:eof | |
;= Add aliases below here | |
;= [Default] | |
e.=explorer . | |
gl=git log --oneline --all --graph --decorate $* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Open PowerShell with Admin rights | |
Get-Acl -Path 'C:\Some\Path' | Set-Acl -Path 'C:\Some\Other\Path' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const check = { | |
// Primitives | |
boolean(value) { | |
return typeof value === "boolean"; | |
}, | |
number(value) { | |
return typeof value === "number" && !isNaN(value); | |
}, | |
biginit(value) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
# How to use: | |
• In Windows, Place the .sublime-sinppet files inside the "%AppData%\Sublime Text\Packages\User" folder. | |
• "%AppData%" refers commonly to "C:\Users\<WinUserName>\AppData\Roaming". | |
# Preview: | |
══════════════════════════════════════════════════════════════════════════════ | |
■ Main-Title (file-name.js) | |
┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ | |
Description. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Generate a integer random number between min and max (both inclusives) | |
function random(min = 0, max = 9) { | |
min = Math.ceil(min); | |
max = Math.floor(max); | |
return Math.floor(Math.random() * (max - min + 1) + min); | |
} | |
// Generate a random decimal (float) number between min and max (both inclusives) | |
function randomF(min = 0.0, max = 9.0) { | |
return Math.random() * (max - min + 1) + min; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global.seconds = (seconds) => Number(seconds) * 1e3; | |
global.minutes = (minutes) => Number(minutes) * 6e4; | |
global.hours = (hours) => Number(hours) * 3.6e6; | |
global.days = (days) => Number(days) * 8.64e7; | |
global.weeks = (weeks) => Number(weeks) * 6.048e8; | |
global.months = (months) => Number(months) * 2.628e9; | |
global.years = (years) => Number(years) * 3.154e10; | |
global.decades = (decades) => Number(decades) * 3.154e11; | |
global.centuries = () => Number(centuries) * 3.154e12; | |
global.date = (miliseconds) => new Date(Number(miliseconds)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git init | |
git add . | |
git commit -m "Initial Commit" | |
gh repo create owner/name -d "Repo Description Here" --private -y | |
git push -u origin main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Method 1 | |
console.cls = function () { | |
process.stdout.write("\033c"); // or process.stdout.write("\x1Bc"); | |
}; | |
// Method 2 | |
console.cls = function () { | |
const readline = require("readline"); | |
console.log("\n".repeat(process.stdout.rows)); | |
readline.cursorTo(process.stdout, 0, 0); |
NewerOlder