Skip to content

Instantly share code, notes, and snippets.

@JLChnToZ
JLChnToZ / cyrillic.user.js
Last active May 17, 2024 12:27
A user script that will transliterates all Latin characters to Cyrillic. Just for fun.
// ==UserScript==
// @name Cyrillic?
// @namespace JLChnToZ
// @grant none
// @version 1.0
// @author -
// @description Transliterates all Latin characters to Cyrillic.
// ==/UserScript==
(() => {
const transliterate = ((latin, cyrillic) => {
@parthamk
parthamk / InterviewPrep.md
Last active May 17, 2024 12:27
Javascript Interview prep

Theoretical Questions and Answers

Variables and Data Types

  1. Question: What are the different data types in JavaScript?

    Answer: JavaScript has several data types, including:

    • Primitive types: String, Number, Boolean, Null, Undefined, Symbol, and BigInt.
    • Non-primitive types: Object (which includes arrays and functions).
@JLChnToZ
JLChnToZ / vrchatlog.ps1
Last active May 17, 2024 12:26
Live view VRChat runtime log on console legally (mod-free)
$Host.UI.RawUI.WindowTitle = 'VRChat Log'
$Host.UI.RawUI.BackgroundColor = 'Black'
$Host.PrivateData.VerboseForegroundColor = 'White'
Clear-Host
Get-Content -Tail $Host.UI.RawUI.BufferSize.Height -Wait -Encoding UTF8 (Get-ChildItem -Path "$($Env:LocalAppData)Low\VRChat\VRChat" -Filter 'output_log_*.txt' | Sort-Object LastWriteTime -Descending | Select-Object -First 1 | ForEach-Object {$_.FullName}) | Where-Object {$_.Trim() -ne ''} | ForEach-Object {
if ($_ -match '^\d{4}\.\d{2}\.\d{2}\s\d{2}:\d{2}:\d{2}\sError') {
$Host.UI.RawUI.ForegroundColor = $Host.PrivateData.ErrorForegroundColor
$Host.UI.RawUI.BackgroundColor = $Host.PrivateData.ErrorBackgroundColor
} elseif ($_ -match '^\d{4}\.\d{2}\.\d{2}\s\d{2}:\d{2}:\d{2}\sException') {
$Host.UI.RawUI.ForegroundColor = $Host.PrivateData.ErrorForegroundColor
@JLChnToZ
JLChnToZ / ObjectSnapshot.cs
Last active May 17, 2024 12:26
Take snapshots of properties of objects/components on play mode and re-apply them when stopped.
using System;
using System.Linq;
using System.Reflection;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEditor;
using UnityEditor.SceneManagement;
using UnityObject = UnityEngine.Object;
@nickytonline
nickytonline / settings.jsonc
Created May 5, 2024 18:25
Latest VS Code Settings
{
// miscellaneous
"javascript.updateImportsOnFileMove.enabled": "always",
"typescript.updateImportsOnFileMove.enabled": "always",
"diffEditor.ignoreTrimWhitespace": false,
// window
"window.title": "🦙⚡🫡 – ${activeEditorShort}${separator}${rootName} – 🫡⚡🦙",
"window.clickThroughInactive": false,
@JLChnToZ
JLChnToZ / Limitless.cs
Last active May 17, 2024 12:25
The dynamic access pass to any methods, properties and fields of any types and instances in C#.
using System;
using System.Collections;
using System.Collections.Generic;
using System.Dynamic;
using System.Reflection;
using System.Runtime.CompilerServices;
namespace JLChnToZ.CommonUtils.Dynamic {
using static LimitlessUtilities;
/// <summary>
@msymt
msymt / REAMDE.md
Created July 23, 2022 07:07
C# to C IPC with memory mapped file

MappedMemory: C# to C

  1. From console create file: dd if=/dev/zero of=/tmp/sharedfile bs=12288 count=1
  2. The C# program
  3. The C program

usage

mcs Sender.cs
@bitingsock
bitingsock / cycle-adevice.lua
Last active May 17, 2024 12:24
Cycle through available audio devices with key binds(shift+a,ctrl+a). Change "wasapi" on line 1 to your relevant audio api.
local api = "wasapi"
local deviceList = mp.get_property_native("audio-device-list")
local aid = 1
local function cycle_adevice(s, e, d)
mp.enable_messages("error")
while s ~= e + d do -- until the loop would cycle back to the number we started on
if string.find(mp.get_property("audio-device"), deviceList[s].name, 1, true) then
while true do
if s + d == 0 then --the device list starts at 1; 0 means we iterated to far
s = #deviceList + 1 --so lets restart at the last device
@judofyr
judofyr / fizzbuzz.rb
Created August 1, 2012 21:37 — forked from JEG2/fizzbuzz.rb
Writing FizzBuzz with flip-flops
a=b=c=(1..100).each do |num|
print num, ?\r,
("Fizz" unless (a = !a) .. (a = !a)),
("Buzz" unless (b = !b) ... !((c = !c) .. (c = !c))),
?\n
end
@leobeeson
leobeeson / mongodb_6_on_wsl2_ubuntu_2204.md
Last active May 17, 2024 12:21
Installation of MongoDB 6.0 on WSL2 Ubuntu 22.04

Installation of MongoDB 6.0 on WSL2 Ubuntu 22.04

Installed MongoDB using the following guide: Install MongoDB

However, the installation in the guide is for MongoDB 5.0 on WSL with Ubuntu 20.04 (focal) distro.

The following is an adaptation of the guide for installing MongoDB 6.0 on WSL with Ubuntu 22.04 jammy distro.

  1. Open your WSL terminal (ie. Ubuntu) and go to your home directory:: cd ~
  2. Update your Ubuntu packages: sudo apt update