Skip to content

Instantly share code, notes, and snippets.

View poloniusDergath's full-sized avatar

Pablo Hernandez-Ferreiros poloniusDergath

View GitHub Profile
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
SetTitleMatchMode, RegEx
#IfWinActive ^PO3.*
toggle := true
^!LButton::
if(toggle) {
# Installs needed:
# Install-Module posh-git -Scope CurrentUser -AllowPrerelease -Force
# Install-Module -AllowClobber Get-ChildItemColor
Import-Module posh-git
function Test-Administrator {
$user = [Security.Principal.WindowsIdentity]::GetCurrent();
(New-Object Security.Principal.WindowsPrincipal $user).IsInRole([Security.Principal.WindowsBuiltinRole]::Administrator)
}
@poloniusDergath
poloniusDergath / Cmderize-GitBash-Extend-GitGui.reg
Last active March 13, 2019 12:01 — forked from jojobyte/ContextCmder-Disable.reg
Cmder Context (Right-Click) Menu for Windows 7/8
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\Background\shell\git_shell\command]
@="\"C:\\tools\\cmdermini\\Cmder.exe\" /SINGLE /START \"%V\" /TASK \"Git bash\""
[HKEY_CLASSES_ROOT\Directory\Background\shell\git_gui]
"Extended"=""
[HKEY_CLASSES_ROOT\Directory\shell\git_shell\command]
@="\"C:\\tools\\cmdermini\\Cmder.exe\" /SINGLE /START \"%1\" /TASK \"Git bash\""
@poloniusDergath
poloniusDergath / winadded.ahk
Last active July 16, 2018 07:25
Added functionality for pcs running Windows with keyboards having no media keys, and extras like open cmd with a key shortcut.
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
; Mediakeys
^#Left::Send {Media_Prev}; ; Ctrl+Win+Left -> Previous song
^#Down::Send {Media_Play_Pause} ; Ctrl+Win+Down -> Play / Pause
^#Right::Send {Media_Next} ; Ctrl+Win+Right -> Next song
^#Up::Send {Media_Stop} ; Ctrl+Win+Up -> Stop
@poloniusDergath
poloniusDergath / VMstatus.cmd
Created May 22, 2018 15:49
CMD script to check the status of a VirtualBox machine
@ECHO OFF
SETLOCAL
:start
cls
set VBOX_HOME=C:\PROGRA~1\Oracle\VirtualBox
%VBOX_HOME%\VBoxManage.exe showvminfo %VM_NAME% > \Temp\vboxfullstatus.txt
@poloniusDergath
poloniusDergath / stopVM.cmd
Created May 22, 2018 15:47
CMD script to stop running VirtualBox machine
@ECHO OFF
SETLOCAL ENABLEDELAYEDEXPANSION
set VBOX_HOME=C:\PROGRA~1\Oracle\VirtualBox
set _VM=%VM_NAME%
%VBOX_HOME%\VBoxManage.exe controlvm %_VM% acpipowerbutton
set _wait=VM stopping, please wait
@poloniusDergath
poloniusDergath / startVM.cmd
Created May 22, 2018 15:46
CMD script to start headless VirtualBox machine
@ECHO OFF
SETLOCAL
set VBOX_HOME=C:\PROGRA~1\Oracle\VirtualBox
%VBOX_HOME%\VBoxManage.exe startvm %VM_NAME% --type headless