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
#!/usr/bin/perl | |
# This simple perl scripts prints lines from mutt colorfile | |
# in actual designated colors. | |
# I have created that script for finetuning my mutt with | |
# iTerm color themes. | |
# I am using here mix of little known library Term::ExtendedColors | |
# for extended colors and escape codes for base16 colors. | |
# Term::ExtendedColors is weird with base16 | |
# It looks fuzzy but works! | |
# Actual colors depend on definitions in terminal color palette first of all |
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
#!/usr/bin/perl | |
use Term::ExtendedColor qw(:all); | |
use strict; | |
use warnings; | |
use feature qw(say); | |
say "Throw me two numbers or two color names separated by space(s)"; | |
while (<>) { | |
# print $_; |
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
" Only do this when not done yet for this buffer | |
if exists("b:did_ftplugin") | |
finish | |
endif | |
let b:did_ftplugin = 1 | |
" safe and simple | |
setlocal nobackup | |
setlocal noswapfile | |
setlocal nowritebackup |
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
#!/usr/bin/env zsh | |
if check-hijacking; then | |
echo "The router doesn't hijack HTTP queries" | |
else | |
echo "The router hijacks HTTP queries - DNSCrypt is likely to be blocked" | |
# kill/stop DNSCrypt | |
networksetup -getcurrentlocation | |
networksetup -switchtolocation 'Captive portal' |
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
#!/usr/bin/env zsh | |
# adapted from Alterstep dnscrypt-proxy OSX client | |
try_resolution() { | |
exec alarmer 5 dig +tries=2 +time=3 +short github.com | egrep '^192[.]30[.]' > /dev/null 2>&1 | |
} | |
try_http_query() { | |
exec alarmer 5 curl -L --max-redirs 5 -4 -m 5 --connect-timeout 5 -s \ | |
http://icanhazip.com/ 2>/dev/null | \ |
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
# | |
brew\sinstall.* | |
brew\sinfo.* | |
brew\sprune.* | |
brew\sdoctor.* | |
brew\slink.* | |
brew\sunlink.* | |
brew\suntap\s | |
.*/Dropbox.* | |
which.* |
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
#!/usr/bin/env zsh | |
# https://github.com/junegunn/fzf/wiki/On-MacVim-with-iTerm2 | |
# used for MacVim fzf | |
# update for iterm2 3.0+ | |
osascript -e \ | |
'on run argv | |
tell application "System Events" | |
set old_frontmost to item 1 of (get name of processes whose frontmost is true) |
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
" :set spelllang=pl,en | |
" :set spell | |
" ---- Color scheme ---- | |
" in .gvimrc for MacVim | |
let g:seoul256_background = 235 | |
colo seoul256 | |
" Make Vim more useful | |
" Enable syntax highlighting | |
" syntax on will overrule commands like :highlight | |
" but syntax enable not - see docs |
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
" Only MacVim-related options here | |
" | |
:cd ~/Documents | |
" | |
" start in fullscreen mode | |
" set fu | |
set columns=80 | |
set lines=42 | |
set guifont=Hack:h14 | |
" set guifont=Space\ Mono:h14 |
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
# LOCALE SETTINGS | |
export LANG=en_US.UTF-8 | |
export LC_CTYPE=en_US.UTF-8 | |
# LC_ALL overwrites all other variables | |
export LC_ALL=en_US.UTF-8 | |
# PATH | |
# http://stackoverflow.com/questions/6555751/ | |
# system-wide environment settings for zsh(1) | |
# if [ -x /usr/libexec/path_helper ]; then | |
# eval `/usr/libexec/path_helper -s` |