Skip to content

Instantly share code, notes, and snippets.

Jan Warchoł jan-warchol

  • Poland
Block or report user

Report or block jan-warchol

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jan-warchol
jan-warchol / gist:f7e556267fede72ab41e
Last active Nov 29, 2015 — forked from mbadran/gist:130469
replace cd in bash to (silent) pushd
View gist:f7e556267fede72ab41e
# "cd with history"
#
# Bash has a nice feature called "directory stack" - sort of "location history":
# https://www.gnu.org/software/bash/manual/html_node/The-Directory-Stack.html
# However, I find the built-in commands not really convenient. This makes the
# directory stack available as a sort of extension to `cd` interface.
function _cd {
# typing just `_cd` will take you $HOME ;)
if [ "$1" == "" ]; then
@jan-warchol
jan-warchol / description.md
Created Jun 17, 2016
Ansible hostvars evaluation problem
View description.md
Setup
-----
Vagrantfile
```
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
(1..2).each do |i|
@jan-warchol
jan-warchol / writing-good-commit-messages.md
Last active May 15, 2017
Yet Another set of rules for writing good commit messages
View writing-good-commit-messages.md

Important rules

  • explain why
  • explain why
  • explain why
  • help with code review

Important formatting rules

  • start with summary line (max 70 characters)
  • add more description after empty line
View functions.sh
# GIT heart FZF
# -------------
is_in_git_repo() {
git rev-parse HEAD > /dev/null 2>&1
}
fzf-down() {
fzf --height 50% "$@" --border
}
@jan-warchol
jan-warchol / sync-history.sh
Last active Aug 16, 2019
Synchronize history across bash sessions
View sync-history.sh
# Synchronize history between bash sessions
#
# Make history from other terminals available to the current one. However,
# don't mix all histories together - make sure that *all* commands from the
# current session are on top of its history, so that pressing up arrow will
# give you most recent command from this session, not from any session.
#
# Since history is saved on each prompt, this additionally protects it from
# terminal crashes.
@jan-warchol
jan-warchol / .bashrc
Created Mar 21, 2018
Miscellaneous bash history settings
View .bashrc
# enable keeping history timestamps and set display format to ISO-8601
export HISTTIMEFORMAT="%F %T "
# ignore duplicates and commands starting with space
HISTCONTROL=ignoreboth
# ignore specific commands (full-length match)
HISTIGNORE=”?:cd:ls:ll:bg:fg:vim:git status”
# disable terminal flow control key binding, so that ^S will search history forward
stty -ixon
@jan-warchol
jan-warchol / README.md
Last active Feb 8, 2019
Przepis na czekoladowiec
View README.md

Autor przepisu: Kacper Peek

Składniki

  • 2 gorzkie czekolady (60-70%)
  • kostka masła (200 g)
  • 6 jajek
  • 200 g cukru
  • kakao
  • ziemniaki powracają
You can’t perform that action at this time.