Skip to content

Instantly share code, notes, and snippets.

View kamack38's full-sized avatar
⌨️
Coding

Kamack38 kamack38

⌨️
Coding
View GitHub Profile
@kamack38
kamack38 / prog.cpp
Last active July 9, 2024 15:54
Portable Neovim using Neovide with Git and Font added to PATH on Windows
#include <windows.h>
#include <iostream>
#include <string>
#include <vector>
bool LoadCustomFont(const std::string &fontPath) {
// Load the font from the specified file path
int numFontsAdded = AddFontResourceA(fontPath.c_str());
if (numFontsAdded > 0) {
@kamack38
kamack38 / aegistoyubi.sh
Created December 19, 2022 21:27
Aegis export.json to YubiKey converter
#!/bin/bash
jq -r '.db.entries[] | [.name, .issuer, .info.algo, .info.secret]| @tsv' <"$1" |
while IFS=$'\t' read -r name issuer algo secret; do
ykman oath accounts add -i "$issuer" -a "$algo" "$name" "$secret"
done
@kamack38
kamack38 / C++SetupForWin10.ps1
Created April 15, 2022 18:59
C++ VScode Windows 10 Setup
# Ensure that file is run as admin
Write-Host "Checking for elevated permissions..."
if (-NOT ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) {
Write-Warning "Insufficient permissions to run this script. Open the PowerShell console as an administrator and run this script again."
Break
}
else {
Write-Host "Script is running as administrator - go on executing the script..." -ForegroundColor Green
}
@kamack38
kamack38 / MPV-Media-Keys-Support.ahk
Created December 29, 2021 20:08
# Adds support for media keys in MPV
Media_Play_Pause::ControlSend, ahk_parent, {Space}, ahk_exe mpv.exe
Media_Next::ControlSend, ahk_parent, {`>}, ahk_exe mpv.exe
Media_Prev::ControlSend, ahk_parent, {`<}, ahk_exe mpv.exe
<+Volume_Up::ControlSend, ahk_parent, {0}, ahk_exe mpv.exe
<+Volume_Down::ControlSend, ahk_parent, {9}, ahk_exe mpv.exe
@kamack38
kamack38 / Convert-CodeExtensionsToHtmlList.ps1
Last active April 14, 2022 11:03
Easily convert Visual Studio Code Extensions list to HTML spoiler
[array]$data = code --list-extensions
$file = ".\codeExtensions.html"
Write-Output '<details>' > $file
Write-Output ' <summary>' >> $file
Write-Output ' VSCode Extensions' >> $file
Write-Output ' </summary>' >> $file
Write-Output ' <ul>' >> $file
for ($i = 0; $i -lt $data.length; $i++) {
Write-Output (' <li>' + '<a href="https://marketplace.visualstudio.com/items?itemName=' + $data[$i] + '">' + $data[$i] + '</a></li>') >> $file
}
@kamack38
kamack38 / loliParadise.ps1
Last active October 2, 2021 16:38
Loli Paradise Show Products In Stock
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
# $errorActionPreference = 'Stop'
# if (Test-Path $PSScriptRoot/update_vars.ps1) { . $PSScriptRoot/update_vars.ps1 }
# else { Write-Error 'Var file doesn''t exists' -Category ResourceUnavailable}
$darkChibiHoodie = [PSCustomObject]@{
Name = '"Dark Chibi" Hoodie'
Link = 'https://loliparadise.com/kolekcja/ubrania/dark-chibi-hoodie'
}
@kamack38
kamack38 / install.sh
Last active August 28, 2021 22:02
Downloads and installs essenstial porgrams
#/bin/bash
# install FriaCode Nerd Font
wget https://github.com/ryanoasis/nerd-fonts/releases/download/v2.1.0/FiraCode.zip
unzip FiraCode.zip -d ~/.fonts
cd ~/.fonts
rm -v !("*.otf"|"Fira Code*")
fc-cache -fv
sudo add-apt-repository ppa:neovim-ppa/unstable
sudo apt-get update