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
<#
.SYNOPSIS
Reusable script for staging many device driver packages to the Drivers Store.
.DESCRIPTION
Intended Use
This script was produced to stage device drivers for an App-V package. Because device drivers
or drivers in general can't be virtualised, a method is required to stage the drivers to the
operating system, what we call in App-V colloquial terms, outside of the bubble.
@glennklockwood
glennklockwood / .bashrc
Created July 23, 2015 01:59
Sensible .bashrc on Solaris 10
### bashrc/bash_profile for SunOS 5.10
# Solaris 10 lacks support for xterm-color (although it is provided in OpenCSW)
if [ "$TERM" == "xterm-color" ]; then
export TERM=xterm
fi
alias ssh='ssh -X'
alias ls='ls -p'
alias md5='digest -a md5 -v'
// This will open up a prompt for text to send to a console session on digital ocean
// Useful for long passwords
(function () {
var t = prompt("Enter text to be sent to console, (This wont send the enter keystroke)").split("");
function f() {
var character = t.shift();
var i=[];
var code = character.charCodeAt();
var needs_shift = "!@#$%^&*()_+{}:\"<>?~|".indexOf(character) !== -1
@AgentRev
AgentRev / fuck_win10_reboot.bat
Last active March 17, 2020 04:47
Shut the fuck up you stupid fucking Windows Update reboot shitfuck - run as admin
rem KILL WINDOWS UPDATE REBOOT WITH FIRE!!!
SET mwuo=Microsoft\Windows\UpdateOrchestrator
schtasks /End /TN "\%mwuo%\Reboot"
schtasks /End /TN "\%mwuo%\USO_UxBroker_Display"
schtasks /End /TN "\%mwuo%\USO_UxBroker_ReadyToReboot"
schtasks /Change /TN "\%mwuo%\Reboot" /DISABLE
schtasks /Change /TN "\%mwuo%\USO_UxBroker_Display" /DISABLE
schtasks /Change /TN "\%mwuo%\USO_UxBroker_ReadyToReboot" /DISABLE
icacls "%WINDIR%\System32\Tasks\%mwuo%\Reboot" /deny "*S-1-1-0:F"
icacls "%WINDIR%\System32\Tasks\%mwuo%\USO_UxBroker_Display" /deny "*S-1-1-0:F"
@kentwait
kentwait / mount_vbox_shared_boot.md
Last active June 20, 2024 12:53
Mount VirtualBox shared folder on boot using fstab

How to mount a VirtualBox shared folder when the Guest OS boots

Problem

While using VirtualBox's Guest Additions to mount shared folders provides a seamless way to mount shared folders, there are also disadvantages.

  • Shared folders will always mount in /media/sf_(share name) unless specified using through vbox drivers in the guest OS
  • Mounting does not happen at boot-time. Applications that require paths at boot will not be able to access the shared folder even after it is mounted - such as Docker.

Solution

Instead of relying on Guest Additions, if you have sudo permissions, shared folders can be mounted at boot-time using fstab. Using this approach allows

@braian87b
braian87b / image-builder-openwrt-lede.sh
Last active February 20, 2024 03:01
Image-Builder Procedure for OpenWRT - LEDE
# ------------------------------------------------------------------------
# Image-Builder Procedure for OpenWRT - LEDE (In this case using Debian x64 NetInstall virtual machine)
# ------------------------------------------------------------------------
su
apt-get update # Optional, make and upgrade too in case it has too many old pakackes.
apt-get install make aria2 screen ncftp -y
screen -
cd ~
// ==UserScript==
// @name Aliexpress
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://trade.aliexpress.ru/orderList.htm*
// @match https://trade.aliexpress.com/orderList.htm*
// @match https://trade.aliexpress.ru/order_list.htm*
// @match https://trade.aliexpress.com/order_list.htm*
@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
// ==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
@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: