This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ... | |
# This is for what I would consider a standard setup, where TTY's 1 -- 6 are | |
# "linux" terminals and TTY's 7+ are reserved for X windows. You should adjust | |
# it to your setup, accordingly. | |
# | |
# ::: Important ::: You must have both fbterm and screen installed and on your | |
# path for this to work. | |
virtual_terminal="$( tty | grep -oE ....$ )" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Def: 50; Reduce tendency to swap on large RAM system | |
vm.swappiness=10 | |
# Def: 100; Reduce to retain inode/dentry caches | |
vm.vfs_cache_pressure=20 | |
# Def: 10; Make it slightly longer to wait longer before writing to HD. | |
vm.dirty_background_ratio=20 | |
# Def: 20; Make it much larger before starting sync writes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Set-WindowState { | |
<# | |
.SYNOPSIS | |
Set a given window state using WinAPI. | |
.DESCRIPTION | |
Use the ShowWindowAsync function to set the Window state for | |
any given window handle or the current powershell process. | |
.EXAMPLE | |
Set-WindowState -State "MINIMIZE" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Clone-AllGitHubRepos | |
{ | |
<# | |
.SYNOPSIS | |
Clone all GitHub Repositories of a given user. | |
.DESCRIPTION | |
Recursively clone all the repos for a given username. | |
.EXAMPLE | |
Clone-AllGitHubRepos -User "aspnet" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Turn display off by calling WindowsAPI. | |
# SendMessage(HWND_BROADCAST,WM_SYSCOMMAND, SC_MONITORPOWER, POWER_OFF) | |
# HWND_BROADCAST 0xffff | |
# WM_SYSCOMMAND 0x0112 | |
# SC_MONITORPOWER 0xf170 | |
# POWER_OFF 0x0002 | |
Add-Type -TypeDefinition ' | |
using System; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Update-AutoModuleManifest | |
{ | |
<# | |
.SYNOPSIS | |
Updates a module manifest automatically with all the script files | |
in the module directory as scripts to process. | |
.DESCRIPTION | |
Looks for the given module's path, and then uses New-ModuleManifest to | |
create a manifest file which includes all the "*.ps1" files in the | |
folder as "ScriptsToProcess". |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function New-FileShortcut | |
{ | |
<# | |
.SYNOPSIS | |
Create Windows shortcuts | |
.DESCRIPTION | |
Creates shortcuts of the Target in the given location. | |
Given locations can either be the full path, or just the name in which | |
case its created on the current path. | |
If just the target path is given, it creates a shortcut with the same |