Skip to content

Instantly share code, notes, and snippets.

View marek-saji's full-sized avatar
:shipit:

Marek ‘saji’ Augustynowicz marek-saji

:shipit:
View GitHub Profile
@marek-saji
marek-saji / dabblet.css
Created January 21, 2013 17:08
Using :not as @supports.
/**
* Using :not as @supports.
*/
article
{
background-color: #7e7;
font-family: Droid Sans, Helvetica, Arial, sans;
}
@marek-saji
marek-saji / redmine.css
Last active December 12, 2015 05:58
Less ugly RedMine
/**
* HG stylesheet, based on "Basecamp"
*/
body, input, select, textarea, h1, h2, h3, h4 {
font-family: "Lucida Grande", "Segoe UI", verdana, arial, helvetica, sans-serif !important;
}
body {
background-color: #bbb;
}
// ==UserScript==
// @name PurpleMine
// @namespace http://redmine.holonglobe.com/
// @version 0.1
// @description Few tweaks for #redmine. #userscript
// @match https://redmine.*
// @copyright 2013+, Marek `saji` Augustynowicz
// ==/UserScript==
/**
@marek-saji
marek-saji / .gitconfig
Last active December 13, 2015 23:49
user-wide .gitconfig
[user]
email = [email protected]
name = Marek 'saji' Augustynowicz
[color]
ui = auto
[alias]
lg = log --graph --pretty=slim --abbrev-commit --date=relative
lgg = !git lg --branches --date-order --date=local
wtf = !git-wtf.rb --relations --short
mmerge = merge --no-ff --log=9999 --edit --no-commit
@marek-saji
marek-saji / server.php
Created February 28, 2013 10:23
Run developer's PHP server, but grep-out boring logs about static files.
#!/bin/sh
cd "$( dirname "$0" )/src/public"
echo "\
APPLICATION_ENV=development \
INSTANCE_NAME=crls \
exec php -d max_input_vars=1111 -S 0.0.0.0:8000 2>&1" \
| script /dev/null \
| grep -vP '\[200\]: \/+(image|style|script|logo|theme)'
@marek-saji
marek-saji / .bashrc
Last active December 14, 2015 12:59
Add this to your .bashrc to include current git tag/branch in shell prompt.
PS1_git() {
BRANCH="$( git rev-parse --abbrev-ref HEAD 2>/dev/null )"
BRANCH="$( git describe --abbrev=0 --tags --match="$BRANCH-*" 2>/dev/null || echo "$BRANCH" )"
test -n "$BRANCH" && echo "($BRANCH) "
}
PS1="\[\033[0;34m\]\$( PS1_git )\[\033[0m\]$PS1"
@marek-saji
marek-saji / colours.sh
Created March 5, 2013 13:49
shell colours
#!/bin/bash
#
# source: http://tldp.org/HOWTO/Bash-Prompt-HOWTO/x329.html
#
# This file echoes a bunch of color codes to the
# terminal to demonstrate what's available. Each
# line is the color code of one forground color,
# out of 17 (default + 16 escapes), followed by a
# test use of that color on all nine background
@marek-saji
marek-saji / dabblet.css
Created March 19, 2013 11:43
omganimations.
/**
* omganimations.
*/
.snowflakes
{
height: 3em;
font-size: 2em;
width: 100%;
background-color: #36e;
@marek-saji
marek-saji / change-git-svn-authors.sh
Created March 24, 2013 16:57
Change authors in git-svn repository basing on git-svn's authorfile.
#!/bin/sh
if [ -z "$1" ]
then
cat <<< HELP
(c) Marek 'saji' Augustynowicz
USAGE
change-git-svn-authors.sh RELATIVE_PATH_TO_AUTHORS_FILE
Obtaining authors.txt for your repository
-----------------------------------------
#!/bin/sh
# Show from which one of integration branches does current branch grows from
# (c) Marek `saji` Augustynowicz
#
# INSTALL:
# git config alias.grows-from '!sh .git/bin/grows-from.sh'
#
# USAGE:
# git grows-from [<commit>]