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 / .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
// ==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 / 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;
}
@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 / JSON.safe.js
Created January 17, 2013 09:49
Safe version of JSON.stringify. Discards functions, detects multiple references to same objects and introduces maximum depth.
function safeJSONStringify (input, maxDepth)
{
var output,
refs = [],
refsPaths = [];
maxDepth = maxDepth || 5;
function recursion (input, path, depth)
@marek-saji
marek-saji / formFiller.js
Last active December 11, 2015 02:18
Easily fill form with dummy content, save form values and restore them. Moved to Code moved to https://github.com/marek-saji/formFiller
window.___formFiller = (function (document, undefined) {
// public methods
var show,
hide,
fillForm,
storeForm,
restoreForm;
// private methods
@marek-saji
marek-saji / dalvik-cache2sd.sh
Created January 12, 2013 20:57
Move dalvik cache of selected apps to SD card.
#!/system/xbin/busybox ash
cd /data/dalvik-cache
find . \
-type f \
\( \
-name '*com.adobe.reader*.dex' \
-or \
-name '*com.google.android.apps.docs*.dex' \
-or \
@marek-saji
marek-saji / pre-commit.sh
Last active December 10, 2015 21:08
git pre-commit hook checking syntax and for illegal words in PHP files.
#!/bin/bash
if git rev-parse --verify HEAD >/dev/null 2>&1
then
against=HEAD
else
# Initial commit: diff against an empty tree object
against=4b825dc642cb6eb9a060e54bf8d69288fbee4904
fi
@marek-saji
marek-saji / dabblet.css
Created December 20, 2012 12:32
dt+dd in one line
/**
* dt+dd in one line
*/
article
{
width: 20em;
}
dl { margin: 1em; background: #a88; clear: both; overflow: auto; }
@marek-saji
marek-saji / dabblet.css
Created July 26, 2012 09:15
SZP's "down due to maintenance" page.
/**
* SZP's "down due to maintenance" page.
*/
min-height : 100%;
padding-top : 30%;
font-family : sans;
font-size : 1.5em;
text-align : center;
color : #eee;