Skip to content

Instantly share code, notes, and snippets.

View Malix-off's full-sized avatar
🌊

Malix Malix-off

🌊
View GitHub Profile
!function() {
var doc = document,
htm = doc.documentElement,
lct = null, // last click target
nearest = function(elm, tag) {
while (elm && elm.nodeName != tag) {
elm = elm.parentNode;
}
return elm;
};
@akaleeroy
akaleeroy / Conjoined-Twins.md
Last active June 30, 2024 14:36
Conjoined Twins - IFTTT-style application actions using auditing and scheduled tasks under Windows

Conjoined Twins

IFTTT-style application actions using auditing and scheduled tasks under Windows

Conjoined Twins IFTTT-style application actions PowerShell script demo

How it works

The script audits a trigger application to make it raise an event when it's executed, then schedules a task to run an action command on that event. For example an automation script, or a batch file, or another app.

Advantages

@DasWolke
DasWolke / microservice bots.md
Last active June 11, 2024 18:16
Microservice bots

Microservice Bots

What they are and why you should use them

Introduction

Recently more and more chatbots appear, the overall chatbot market grows and the platform for it grows as well. Today we are taking a close look at what benefits creating a microservice chatbot on Discord - (a communication platform mainly targeted at gamers) would provide.

The concepts and ideas explained in this whitepaper are geared towards bots with a bigger userbase where the limits of a usual bot style appear with a greater effect

Information about Discord itself

(If you are already proficient with the Discord API and the way a normal bot works, you may skip ahead to The Concept)

@seanh
seanh / html_tags_you_can_use_on_github.md
Last active July 22, 2024 14:45
HTML Tags You Can Use on GitHub

HTML Tags You Can Use on GitHub

Wherever HTML is rendered on GitHub (gists, README files in repos, comments on issues and pull requests, ...) you can use any of the HTML elements that GitHub Flavored Markdown (GFM) provides syntactic sugar for. You can either use the syntactic sugar that GFM (or other GitHub-supported markup language you're using) provides or, since Markdown can contain raw HTML, you can enter the HTML tags manually.

But GitHub also allows you to use a few HTML elements beyond what Markdown provides by entering the tags manually, and some of them are styled with CSS. Most raw HTML tags get stripped before rendering the HTML. Those tags that can be generated by GFM syntactic sugar, plus a few more, are whitelisted. These aren't documented anywhere that I can find. Here's what I've discovered so far:

<details> and <summary>

A `<detai

@Malix-off
Malix-off / windows-folder-browser_COM.bat
Last active May 27, 2022 17:33
Windows Folder Browser - COM
setlocal
set "psCommand="(new-object -COM 'Shell.Application')^.BrowseForFolder(0,'Please choose a folder.',0,0).self.path""
for /f "usebackq delims=" %%I in (`powershell %psCommand%`) do set "folder=%%I"
endlocal
@Malix-off
Malix-off / windows-file-browser_COM.bat
Last active May 27, 2022 17:34
Windows File Browser - COM
setlocal
for /f "delims=" %%I in ('powershell -noprofile "iex (${%~f0} | out-string)"') do (
echo You chose %%~I
)
goto :EOF
: end Batch portion / begin PowerShell hybrid chimera #>
Add-Type -AssemblyName System.Windows.Forms
@Malix-off
Malix-off / Main.bat
Last active October 18, 2022 18:04
Lenovo Fn And Function Keys Indicator Switch
@echo off
:Initialisation
title Lenovo Fn and Function Keys Indicators
:Administrator_Permission
REM Complying with Administrator Permissions
:Check
REM Trying Running an Action Requiring Administrative Permissions, Then Store its Standard Error Output, OS-Dynamically
@Malix-off
Malix-off / Administrator.bat
Last active October 18, 2022 16:07
Batch - Script Require Administrative Permissions Template
@echo off
:Initialisation
REM YOUR INITIALISATION CODE HERE
:Administrator_Permission
REM Complying with Administrator Permissions
:Check
REM Trying Running an Action Requiring Administrative Permissions, Then Store its Standard Error Output, OS-Dynamically
@Malix-off
Malix-off / .gitignore
Last active February 14, 2024 17:08
Discord Desktop (Windows) Amoled Switching Tool
# GitHub Gists
*/
# Environment
*env*
@s1gnate-sync
s1gnate-sync / build-container-vm.sh
Last active June 28, 2024 00:59
Bootstrapping custom virtual machine on chrome os without any dependencies (it reuses existing vm and it's kernel)
#!/usr/bin/env bash
export LC_ALL=C
set -eu
if test "$(id -u)" -ne 0; then
echo "install: must be root"
exit 1
fi