Skip to content

Instantly share code, notes, and snippets.

View chew-z's full-sized avatar

Robert J. chew-z

  • Warsaw, Poland
View GitHub Profile
@chew-z
chew-z / dns2pl
Created February 28, 2017 09:58
filters dnscrypt-resolvers.csv file
#!/usr/bin/env perl
use strict;
use warnings;
use feature qw(say);
use Text::CSV;
my $csv = Text::CSV->new({ sep_char => ',' });
my $outfile = 'resolvers.csv';
@chew-z
chew-z / Chrome Commandline.md
Last active August 30, 2022 07:29
Notes on using Chrome on macOS

Chrome Notes

Privacy

--disable-sync

Disables syncing browser data to a Google Account.

--disable-sync-types

@chew-z
chew-z / ctrl-p
Created February 19, 2017 16:25
My CtrlP - using fzf - open, edit or reveal in finder
#!/usr/bin/env zsh
#
# https://adamheins.com/blog/ctrl-p-in-the-terminal-with-fzf
# This is the same functionality as fzf's ctrl-t, except that the file or
# directory selected is now automatically cd'ed or opened, respectively.
fzf-edit-file-or-open-dir() {
local out key file helpline
helpline="Ctrl-f to open in Finder | uses ag -g\"\" respecting .ignore"
IFS=$'\n' out=($(ag -g "" | fzf --header="$helpline" --exit-0 --expect=ctrl-f))
@chew-z
chew-z / .aliases
Created February 19, 2017 16:23
My multiple .aliases
#
# For a full list of active aliases, run `alias`.
#
# virtualenv
# lazy loading saves on shell startup time
workon() {
[ -z "$WORKON_HOME" ] && {
unset -f workon
export WORKON_HOME=$HOME/.virtualenvs
export PROJECT_HOME=$HOME/Documents/Python
@chew-z
chew-z / .zshrc
Created February 19, 2017 16:19
My simple and humble .zshrc
# homebrew configuration
export HOMEBREW_INSTALL_BADGE="☕️ "
#
# https://iterm2.com/shell_integration.html
source ${HOME}/.iterm2_shell_integration.zsh
# z is the new j (installed from brew)
source "$(brew --prefix)/etc/profile.d/z.sh"
# Fuzzy search - fzf & Co
# Ctrl-R - command history
# Ctrl-T - files - full paths
@chew-z
chew-z / .zshenv
Created February 19, 2017 16:18
My .zshenv
# 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`
@chew-z
chew-z / .gvimrc
Created February 19, 2017 16:17
My .gvimrc
" 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
@chew-z
chew-z / .vimrc
Created February 19, 2017 16:15
My precious .vimrc
" :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
@chew-z
chew-z / fzf_MacVim.sh
Created February 19, 2017 16:12
Glue between MacVim - fzf - iTerm
#!/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)
@chew-z
chew-z / trim_zsh_history.conf
Created February 14, 2017 09:52
Removes silt from .zsh_history file
#
brew\sinstall.*
brew\sinfo.*
brew\sprune.*
brew\sdoctor.*
brew\slink.*
brew\sunlink.*
brew\suntap\s
.*/Dropbox.*
which.*