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
/**
* card swap
*/
.a
{
border : #6f6 solid;
animation : a 10s infinite;
z-index : 1;
@marek-saji
marek-saji / dabblet.css
Created May 24, 2012 22:22
Hourglass loading animations
/**
* Hourglass loading animations
*/
body
{
background-color : #b4da55; /* \m/ */
font-family : sans;
}
@marek-saji
marek-saji / dabblet.css
Created May 30, 2012 22:26
/peɪstbɪn/
/**
* /peɪstbɪn/
*/
body { line-height : 2em; }
#a { font-family : sans; }
#b { font-family : Palatino; }
#c { font-family : Palatino Linotype; }
#d { font-family : Georgia; }
@marek-saji
marek-saji / dabblet.css
Created June 5, 2012 17:37
New default "down due to maintenance" page.
/**
* New default "down due to maintenance" page.
*/
min-height : 100%;
padding-top : 30%;
font-family : sans;
font-size : 1.5em;
text-align : center;
color : #eee;
@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;
@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 / 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 / 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 / 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 / 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)