Skip to content

Instantly share code, notes, and snippets.

View szymon-jez's full-sized avatar

Szymon Jeż szymon-jez

View GitHub Profile
@szymon-jez
szymon-jez / .extend.prompt.bashrc
Last active January 15, 2018 12:17 — forked from justintv/.bashrc
Display git branch in bash prompt and start prompt in new line
# If you work with git, you've probably had that nagging sensation of not knowing what branch you are on. Worry no longer!
parse_git_branch() {
git branch 2>/dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
export PS1='\[\033[01;32m\][\u@\h\[\033[01;37m\] \W\[\033[01;32m\]]$(parse_git_branch)\n\$\[\033[00m\] '
# This will change your prompt to display not only your working directory but also your current git branch, if you have one. Pretty nifty!
# This will also make the command line be in two lines.
@szymon-jez
szymon-jez / keybase.md
Created March 15, 2017 09:04
keybase.md

Keybase proof

I hereby claim:

  • I am szymon-jez on github.
  • I am szymon_jez (https://keybase.io/szymon_jez) on keybase.
  • I have a public key ASCpccHsoFZ2dArdEHksOeYI8R-zMaMJUUwPcuhcYyeWNAo

To claim this, I am signing this object:

namespace :db do
namespace :fixtures do
desc ' Creates YAML test fixtures from data in an existing database.
Parameters:
RAILS_ENV - use to select databese. Default is to development database (eg. RAILS_ENV=test).
TABLES - use to select tables to extract. By default all tables are extractd. (eg. TABLES=users,orders).
DIR - use to change default (/test/fixtures) write directory (eg. DIR=./db/data).'
task :extract => :environment do
dir = ENV['DIR'] || "#{RAILS_ROOT}/test/fixtures"
@szymon-jez
szymon-jez / .autotest.rb
Created March 23, 2009 07:57
ZenTest Autotest configuration file
# -*- ruby -*-
# configuration file for autotes from ZenTest
# author: Szymon (jeznet) Jeż <szymon@jez.net.pl>
# inspired by the code found inside the ZenTest gem
require 'autotest/redgreen'
module Autotest::Notify
ALL_TESTS_COUNT = 10 # change this to be ca. 50% of the number of test in your test suite; this is used when chcking if all avaible tests passed or only a subset of them