Skip to content

Instantly share code, notes, and snippets.

@JLChnToZ
JLChnToZ / syncgif.js
Created January 14, 2018 14:16
A little script for refreshing all gifs on a webpage to make them synchronized.
(function refreshGif(selector, images, srcs) {
var mode = !!srcs, i;
if(mode) {
for(i = 0; i < images.length; i++)
images[i].src = srcs[i];
return;
}
var dummyGif = 'data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==';
images = document.querySelectorAll((selector || '') + ' img[src$=\'.gif\']');
srcs = [];
@diasporx
diasporx / JetBrains products Activation code until 14 October 2024
Last active May 17, 2024 12:29
JetBrains products Activation code until 14 October 2024
I2A0QUY8VU-eyJsaWNlbnNlSWQiOiJJMkEwUVVZOFZVIiwibGljZW5zZWVOYW1lIjoiVU5JVkVSU0lEQURFIEVTVEFEVUFMIERFIENBTVBJTkFTIiwiYXNzaWduZWVOYW1lIjoiVGFvYmFv77yaSkVU5YWo5a625qG25r+AIOa0u+W3peS9nOWupCAgcmVuIHpodW4gZGlhbiBtaW5n77yBIiwiYXNzaWduZWVFbWFpbCI6IlJvYmJ5X1dlbmlnZXJAb3V0bG9vay5jb20iLCJsaWNlbnNlUmVzdHJpY3Rpb24iOiJGb3IgZWR1Y2F0aW9uYWwgdXNlIG9ubHkiLCJjaGVja0NvbmN1cnJlbnRVc2UiOmZhbHNlLCJwcm9kdWN0cyI6W3siY29kZSI6IkRQTiIsInBhaWRVcFRvIjoiMjAyNC0xMC0xNCIsImV4dGVuZGVkIjpmYWxzZX0seyJjb2RlIjoiREIiLCJwYWlkVXBUbyI6IjIwMjQtMTAtMTQiLCJleHRlbmRlZCI6ZmFsc2V9LHsiY29kZSI6IlBTIiwicGFpZFVwVG8iOiIyMDI0LTEwLTE0IiwiZXh0ZW5kZWQiOmZhbHNlfSx7ImNvZGUiOiJJSSIsInBhaWRVcFRvIjoiMjAyNC0xMC0xNCIsImV4dGVuZGVkIjpmYWxzZX0seyJjb2RlIjoiUlNDIiwicGFpZFVwVG8iOiIyMDI0LTEwLTE0IiwiZXh0ZW5kZWQiOnRydWV9LHsiY29kZSI6IkdPIiwicGFpZFVwVG8iOiIyMDI0LTEwLTE0IiwiZXh0ZW5kZWQiOmZhbHNlfSx7ImNvZGUiOiJETSIsInBhaWRVcFRvIjoiMjAyNC0xMC0xNCIsImV4dGVuZGVkIjpmYWxzZX0seyJjb2RlIjoiUlNGIiwicGFpZFVwVG8iOiIyMDI0LTEwLTE0IiwiZXh0ZW5kZWQiOnRydWV9LHsiY29kZSI6IkRTIiwicGFpZFVwVG8iOiIyMDI0LTEwL
.css-selector {
    background: linear-gradient(270deg, #ee7b1e, #eea01e, #e35311);
    background-size: 600% 600%;
    -webkit-animation: AnimationName 30s ease infinite;
    -moz-animation: AnimationName 30s ease infinite;
    -o-animation: AnimationName 30s ease infinite;
    animation: AnimationName 30s ease infinite;
}
@-webkit-keyframes AnimationName {
    0%{background-position:0% 50%}
@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