Skip to content

Instantly share code, notes, and snippets.

View BitPatty's full-sized avatar
🐕
Walking my watchdog

Matteias Collet BitPatty

🐕
Walking my watchdog
View GitHub Profile
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
/**
* Runs the specified task until the specfied
* condition is met
*
* @param task The task to run
* @param breakCondition The breaking condition
* @param timeout The timeout between attempts in miliseconds
* @param options Additional options to tweak the timeout and
* max retry count
*/
$Hscroll = Get-Process | ? Name -eq "HscrollFun"
If ($Hscroll -eq $null){
Start-Process -FilePath "C:\Program Files (x86)\Lenovo\ThinkPad Compact Keyboard with TrackPoint driver\HScrollFun.exe"}
else {
"running"
}
@BitPatty
BitPatty / profiles.json
Created February 28, 2020 22:17
WSL Configuration
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"defaultProfile": "{2c4de342-38b7-51cf-b940-2309a097f518}",
"alwaysShowTabs": false,
"showTabsInTitlebar": false,
@BitPatty
BitPatty / WinError.cs
Created April 27, 2018 08:23
Enum containing all the system error codes from https://msdn.microsoft.com/en-us/library/windows/desktop/ms681382(v=vs.85).aspx (Not including ERROR_INTERNET_* 0x2E00 - 0x2EE0)
public enum Win32Error : uint
{
/// <summary>The operation completed successfully.</summary>
ERROR_SUCCESS = 0x0,
/// <summary>Incorrect function.</summary>
ERROR_INVALID_FUNCTION = 0x1,
/// <summary>The system cannot find the file specified.</summary>
ERROR_FILE_NOT_FOUND = 0x2,