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
using System; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.Diagnostics; | |
using System.Linq; | |
using System.Windows.Forms; | |
namespace CountersListPreview | |
{ | |
internal static class CounterPreview |
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
sudo apt-get update && \ | |
sudo apt-get install -y git git-core curl zsh nano && \ | |
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" && \ | |
sed -i -E 's/ZSH_THEME=".+"/\[\[ \-n \$SSH_CONNECTION \]\] \&\& ZSH_THEME\="bira" \|\| ZSH_THEME\="af\-magic"/g' $HOME/.zshrc && \ | |
env zsh |
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
# map helpers | |
hput() { | |
eval "$1""$2"='$3'; | |
} | |
hget() { | |
eval echo '${'"$1$2"'#hash}'; | |
} | |
# bulk set |
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
# from https://github.com/sindresorhus/quick-look-plugins | |
brew cask install qlcolorcode qlstephen qlmarkdown quicklook-json betterzip suspicious-package | |
echo "open BetterZip to activate ql plugin" |
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 stress_cpu() { | |
for I in `seq 1 $(getconf _NPROCESSORS_ONLN)` | |
do | |
yes > /dev/null & | |
done | |
echo "Press enter to stop" | |
read | |
killall yes | |
} |
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
#! /bin/bash | |
get_apps_bundle_id() { | |
local name=$1 | |
[[ -z $name ]] && { return; } | |
if [ ! -d "$name" ]; then | |
name=/Applications/${name}.app | |
if [ ! -d "$name" ]; then | |
return; | |
fi |
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
#! /bin/bash | |
# this script should be run on login | |
# this swapps `/~ and §/± key on uk layout | |
hidutil property --set '{"UserKeyMapping":[{"HIDKeyboardModifierMappingSrc":0x700000064,"HIDKeyboardModifierMappingDst":0x700000035},{"HIDKeyboardModifierMappingSrc":0x700000035,"HIDKeyboardModifierMappingDst":0x700000064}]}' |
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
# looping over all argumetns while shifting the arguments array | |
function looping-over-all-arguments-destructive() { | |
while [[ $# -gt 0 ]]; | |
do | |
opt="$1"; | |
shift; #expose next argument | |
case "$opt" in | |
"--file" ) | |
INCLUDE=$1; | |
shift;; |
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
REM *** run as ADMINISTRATOR ! | |
REM Forces windows to update time | |
@echo off | |
set retryCount=0 | |
echo Resync END | |
:SyncStart | |
if %retryCount% == 10 goto SyncFailed |
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
# check dependencies | |
command -v brew >/dev/null 2>&1 || { echo >&2 "brew is not installed, aborting"; exit 1; } | |
command -v git >/dev/null 2>&1 || { echo >&2 "git is not installed, aborting"; exit 1; } | |
# install oh-my-zsh without entering it | |
curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh | sed -e "s/env zsh -l/echo ---/g" | sh | |
# clone powerlelvel9k theme | |
git clone https://github.com/bhilburn/powerlevel9k.git ~/.oh-my-zsh/custom/themes/powerlevel9k | |
# set zsh theme | |
sed -i '' -e 's/ZSH_THEME=".*"/ZSH_THEME="powerlevel9k\/powerlevel9k"/g' ~/.zshrc | |
# turn off brew auto apdates for this session |
OlderNewer