Skip to content

Instantly share code, notes, and snippets.

View jkniiv's full-sized avatar

Jarkko Kniivilä jkniiv

  • Hämeenlinna, Finland, the EU
View GitHub Profile
@ClassicDarkChocolate
ClassicDarkChocolate / ScoopExtensions.ps1
Last active September 10, 2023 20:51
Commands: Get-ScoopPackageVersions, Invoke-ScoopPackageCommand, Install-ScoopPackage
function Get-ScoopRoot {
$scoopdir = & {
$env:SCOOP, (scoop config 'rootPath'), "$env:USERPROFILE\scoop" | Where-Object { -not [String]::IsNullOrEmpty($_) } | Select-Object -First 1
} 6>$null
$scoopdir
}
function Get-ScoopPackageVersions {
param (
[Parameter(Position = 1, Mandatory = $true)]
@glowinthedark
glowinthedark / generate_directory_index_caddystyle.py
Last active February 16, 2024 21:58
Generate directory index (recurse subfolders with `-r` or `--recursive`). Use `-h` or `--help` for all options ❗️superseded by https://github.com/glowinthedark/index-html-generator
#!/usr/bin/env python3
# NOTE: this script is deprecated;
# maintained version with SVG icons: https://github.com/glowinthedark/index-html-generator/
# ---
# Copyright 2020 glowinthedark
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
#!/usr/bin/env python3
# Recursively generate index.html files for
# all subdirectories in a directory tree
##########################################################################
## ❗️❗️❗️ WARNING: This version is outdated and unmaintained!
## For an up-to-date version with cleaner CSS styling see:
## https://gist.github.com/glowinthedark/625eb4caeca12c5aa52778a3b4b0adb4
##########################################################################
@goffinet
goffinet / install_config-win2k19_no_gui-proxmox.md
Last active May 6, 2024 22:12 — forked from gryte/install_config-win2k16_core-proxmox.md
Install and Configure - Windows Server 2019 no GUI on ProxMox VM

Install and Configure - Windows Server 2016 Core on ProxMox VM

stage drivers locally

# display available drives
Get-PSDrive

# create local driver directory
mkdir c:\drivers
// ==UserScript==
// @name Aliexpress_Billy_edit
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://trade.aliexpress.com/orderList.htm*
// @grant unsafeWindow
// @grant GM_xmlhttpRequest
// @grant GM_setClipboard
@KINGSABRI
KINGSABRI / Disable-Windows10-autoupdate-and-security.ps1
Last active October 2, 2019 11:26
PowerShell Disable Windows10 Auto update and Security
Clear-Host
Write-Host "1 -> Never check for updates"
Write-Host "2 -> Disable Windiws Firewall"
Write-Host "3 -> Disable Windiws Defender"
Write-Host "Enter any character to exit"
Write-Host
switch(Read-Host "Choose Window Update Settings"){
@noinkling
noinkling / MinttyCampbell
Created July 9, 2018 01:53
WSLtty Campbell theme (place in %appdata%\wsltty\themes)
ForegroundColour=204,204,204
BackgroundColour=0,0,0
CursorColour=242,242,242
Black=12,12,12
BoldBlack=118,118,118
Red=197,15,31
BoldRed=231,72,86
Green=19,161,14
BoldGreen=22,198,12
Yellow=193,156,0
@SalviaSage
SalviaSage / Correct Registry Syntax.md
Last active May 25, 2024 05:05
Guide on Editing the Windows Registry.

Last Revised: 2021-04-29 (added the section about file creation and default file naming.)

I made this guide to help me or anyone else who is interested in editing the Windows Registry.

It is possible to modify the entries of the Windows Registry. To do this, you need to create a file that ends with the extension .reg.


.reg file encoding:

// ==UserScript==
// @name Aliexpress
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://trade.aliexpress.com/orderList.htm*
// @grant unsafeWindow
// @grant GM_xmlhttpRequest
// @grant GM_setClipboard
@ajdruff
ajdruff / fix-git-line-endings
Last active May 28, 2024 15:15
Forces all line endings to LF in your git repo.
#####################
#
# Use this with or without the .gitattributes snippet with this Gist
# create a fixle.sh file, paste this in and run it.
# Why do you want this ? Because Git will see diffs between files shared between Linux and Windows due to differences in line ending handling ( Windows uses CRLF and Unix LF)
# This Gist normalizes handling by forcing everything to use Unix style.
#####################
# Fix Line Endings - Force All Line Endings to LF and Not Windows Default CR or CRLF