Skip to content

Instantly share code, notes, and snippets.

MXI KillyMXI

Block or report user

Report or block KillyMXI

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@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 Dec 22, 2018
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 = "😀éé"
@KillyMXI
KillyMXI / graphemeCountExample.hs
Last active Apr 28, 2019
Haskell grapheme cluster examples
View graphemeCountExample.hs
import Data.Text.ICU
import qualified Data.Text as T
graphemeClustersCount :: LocaleName -> T.Text -> Int
graphemeClustersCount loc = length . breaks (breakCharacter loc)
testStr = "😀éé"
main :: IO ()
main = print $ graphemeClustersCount Current $ T.pack $ testStr
@KillyMXI
KillyMXI / terminal-color-check.ps1
Created Jun 11, 2017
Terminal colors table (PowerShell)
View terminal-color-check.ps1
$cs = @("Black","White","Gray","DarkGray","Red","DarkRed","Green","DarkGreen","Blue","DarkBlue","Cyan","DarkCyan","Magenta","DarkMagenta","Yellow","DarkYellow")
foreach ($tc in $cs) {
foreach ($bc in $cs) {
write-host " 123 " -foregroundcolor $tc -backgroundcolor $bc -noNewLine
}
write-host
}
@KillyMXI
KillyMXI / recentmost-example.ps1
Last active Sep 22, 2017
Get N most recent (or by any other value function) files without sorting entire list.
View recentmost-example.ps1
function InsertSorted($array, $item, $maxn, [scriptblock]$valueFunction) {
$a = $valueFunction.InvokeReturnAsIs($item);
$j = for($i = 0; $i -lt $array.Count; $i++) {
$b = $valueFunction.InvokeReturnAsIs($array[$i]);
if ($a -lt $b) { $i; break }
}
if($j -eq $null) {
return ($array[0..($array.Count-1)] + $item)[-$maxn..-1];
} elseif($j -eq 0) {
if($array.Count -lt $maxn) {
View Invoke-Parallel.ps1
function Invoke-Parallel {
<#
.SYNOPSIS
Function to control parallel processing using runspaces
.DESCRIPTION
Function to control parallel processing using runspaces
Note that each runspace will not have access to variables and commands loaded in your session or in other runspaces by default.
This behaviour can be changed with parameters.
You can’t perform that action at this time.