Skip to content

Instantly share code, notes, and snippets.

@KillyMXI
KillyMXI / Shuffle-Groups.ps1
Created Apr 29, 2021
Shuffle groups in an AIMP playlist ("*.aimppl4") while preserving the order inside groups.
View Shuffle-Groups.ps1
<#
.SYNOPSIS
Shuffle groups in an AIMP playlist ("*.aimppl4")
while preserving the order inside groups.
.PARAMETER inputPath
Input file to be shuffled ("*.aimppl4").
#>
@KillyMXI
KillyMXI / README.md
Created Apr 25, 2021
Node.js map/for performance benchmark comparison
View README.md

Comparison of different way to map an array in Node.js

  • Properly used map is quite good;

  • Badly used for_i can be absolutely horrible;

  • A custom map-like function is on par with bare for_i;

  • Not all for_i loops are equally optimized;

View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>longest string</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Matrix (2D-array) transpose</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
@KillyMXI
KillyMXI / GeoInfoService.cs
Last active Mar 28, 2021
GetGeoInfoEx C# example
View GeoInfoService.cs
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Runtime.InteropServices;
namespace GeoInfoService
{
public static class GeoInfoService
{
@KillyMXI
KillyMXI / Next.QTTabBarCommand
Created Dec 20, 2018
A pair of buttons for [QTTabBar](http://qttabbar.wikidot.com/) to navigate between folders within one common parent folder.
View Next.QTTabBarCommand
<?xml version="1.0" encoding="utf-8"?>
<CommandButtonInfo>
<MetaData>
<DateCreated>2016-03-24T15:45:16.0981452+03:00</DateCreated>
<Author>MXI</Author>
<Contact>http://mxii.eu.org/</Contact>
<Description>Navigate to the next folder within common parent folder.</Description>
<Version>1.0</Version>
</MetaData>
<CommandButton Type="File" SubType="Normal" PersistentID="20753363">
@KillyMXI
KillyMXI / Next.QTTabBarCommand
Last active Mar 31, 2020
A pair of buttons for QTTabBar (http://qttabbar.wikidot.com/) to navigate between folders within one common parent folder. More about this: http://mxii.eu.org/2018/12/22/next-folder-previous-folder-navigation-in-explorer-with-qttabbar/
View Next.QTTabBarCommand
<?xml version="1.0" encoding="utf-8"?>
<CommandButtonInfo>
<MetaData>
<DateCreated>2016-03-24T15:45:16.0981452+03:00</DateCreated>
<Author>MXI</Author>
<Contact>http://mxii.eu.org/</Contact>
<Description>Navigate to the next folder within common parent folder.</Description>
<Version>1.0</Version>
</MetaData>
<CommandButton Type="File" SubType="Normal" PersistentID="20753363">
@KillyMXI
KillyMXI / Next.QTTabBarCommand
Created Dec 20, 2018
A pair of buttons for [QTTabBar](http://qttabbar.wikidot.com/) to navigate between folders within one common parent folder.
View Next.QTTabBarCommand
<?xml version="1.0" encoding="utf-8"?>
<CommandButtonInfo>
<MetaData>
<DateCreated>2016-03-24T15:45:16.0981452+03:00</DateCreated>
<Author>MXI</Author>
<Contact>http://mxii.eu.org/</Contact>
<Description>Navigate to the next folder within common parent folder.</Description>
<Version>1.0</Version>
</MetaData>
<CommandButton Type="File" SubType="Normal" PersistentID="20753363">
@KillyMXI
KillyMXI / index.html
Last active Jan 14, 2018
Mouse scroll emulation test
View index.html
<!DOCTYPE html>
<html>
<head>
<title>Mouse scroll emulation test</title>
<link href="style.css" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.5.16/p5.js"></script>
<script src="pointerlock.js"></script><!-- https://github.com/IceCreamYou/PointerLock.js -->
<script src="sketch.js"></script>
</head>
@KillyMXI
KillyMXI / unicodeNorm.hs
Created Nov 18, 2017
Haskell Unicode normalization
View unicodeNorm.hs
import Data.Text.Normalize
import qualified Data.Text as T
import GHC.IO.Encoding
import System.Win32.Console
procString :: (T.Text -> T.Text) -> String -> String
procString f = T.unpack . f . T.pack
testStr = "😀éé"