This file contains hidden or 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
| #+*F6:: ; assign hotkey (windows+Shift+F6) | |
| Run, mmsys.cpl | |
| WinWait,Sound | |
| ControlSend,SysListView321,{Down 1} ; By changing the number behind Down the audiodevice can be selcted | |
| ControlClick,&Set Default | |
| ControlClick,OK | |
| return | |
| #+*F7:: | |
| Run, mmsys.cpl |
This file contains hidden or 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
| # prints the current path avaible in the PowerShell | |
| function path | |
| { | |
| $curr = Get-Location | |
| cd env: | |
| (ls path).value.split(“;”) | |
| cd $curr | |
| } |
This file contains hidden or 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 read-clipboard | |
| { | |
| PowerShell -NoProfile -STA -Command { | |
| Add-Type -Assembly PresentationCore | |
| [Windows.Clipboard]::GetText() | |
| } | |
| } | |
This file contains hidden or 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
| find ~ -type d -name .git | xargs -n 1 dirname | xargs -n 1 basename |
This file contains hidden or 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 find_nearest(array, value): | |
| return (np.abs(array - value)).argmin() |
This file contains hidden or 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
| \the\textwidth |
This file contains hidden or 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
| xautolock -time 10 -notify 30 -notifier "notify-send 'Locking screen in 30 s' --icon=appointment" -locker xflock4 |
This file contains hidden or 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 global:prompt { | |
| $realLASTEXITCODE = $LASTEXITCODE | |
| $global:l = "$($(Get-History)[-1])" | |
| $temp = "$($(Get-History)[-1])" -split " " | |
| $global:lc = $temp[0] | |
| $global:lp = $temp[1..($temp.length-1)] | |
| # Reset color, which can be messed up by Enable-GitColors | |
| $Host.UI.RawUI.ForegroundColor = $GitPromptSettings.DefaultForegroundColor | |
| Write-Host($(Split-Path $pwd -Leaf)) -nonewline -foregroundcolor Blue |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
| #!/bin/bash | |
| contains() { | |
| [[ $1 =~ $2 ]] && return 0 || return 1 | |
| } | |
| app_list=$(wmctrl -lx | awk '{print $3}') | |
| if contains "$app_list" "$2"; |
OlderNewer