Skip to content

Instantly share code, notes, and snippets.

View czterystaczwarty's full-sized avatar

Tomasz Szopiński czterystaczwarty

View GitHub Profile
{"title":"test video","description":"hsjfav","screen":"http://amway.apide.com/de/media/screen/2-amway-german-test-video.jpeg","file":"http://amway.apide.com/de/media/view/4.mp4","duration":"01:25","brand":"Amway german","views":2,"rating":0}
#!/bin/bash
AUTHOR=$(git config user.name)
DATE=$(date +%F)
git log --no-merges --format="%cd" --date=short --no-merges --author="$AUTHOR" --all | sort -u -r | while read DATE ; do
if [ $NEXT != "" ]
then
echo
echo [$NEXT]
fi
GIT_PAGER=cat git log --no-merges --format=" %s" --since=$DATE --until=$NEXT --author="$AUTHOR" --all
@czterystaczwarty
czterystaczwarty / extract_colors.sh
Last active August 29, 2015 14:00
Extracts colors with CSS, sort and remove duplicates.
# Extracts colors with CSS, sort and remove duplicates.
egrep -o 'rgba\([[:digit:],\.\s\ ]+\)|#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})' style.css | sed 's/ *//g' | xargs -n1 | sort -u
@czterystaczwarty
czterystaczwarty / bug.css
Created November 19, 2013 12:38
Safari iOS 7 bug
.crash-me {
-webkit-transform: translate(calc(60px - 100%), 0);
}
@czterystaczwarty
czterystaczwarty / ie8_directives.html
Created November 7, 2013 21:12
Angular directives in IE 8
<!doctype html>
<head>
<!--[if lte IE 8]>
<script>
document.createElement('poster');
</script>
<![endif]-->
</head>
@czterystaczwarty
czterystaczwarty / hide_exc_4.css
Created May 14, 2013 08:41
Hide all except last 4 elemenst
/* ukryj elementy poza pozostałymi... 4-rema ;) */
li:nth-last-child(n+5) {
display: none;
}
@czterystaczwarty
czterystaczwarty / param-mixin.less
Created April 26, 2013 13:33
LESS: mixin with default parameter
// default-color
@emboss-color: #fff;
// mixin with default parameter
.emboss-effect (@color:@emboss-color) {
text-shadow: 0 1px 0 @color;
}
.emboss-effect();
@czterystaczwarty
czterystaczwarty / thunder_song.txt
Created April 16, 2013 20:18
thunder_song.txt
When you hear the sound of thunder,
don’t you get too scared.
Just grab your thunder buddy,
and say these magic words:
“Fuck you, Thunder!
You can suck my dick.
You can’t get me, Thunder,
because you’re just God’s farts.”
@czterystaczwarty
czterystaczwarty / gist:5263328
Created March 28, 2013 13:59
return first not null
function fst_not_null ($param_1. $param_2, ...) {
// get array of params
// or array
return current(array_filter(array($param_1, $param_2, ...)));
}
@czterystaczwarty
czterystaczwarty / markup.html
Created March 27, 2013 22:37
Simplest slider
<div class="slideshow">
<div class="slide-1">
<div class ="fr frame1"></div>
<div class ="fr frame4"></div>
<div class ="fr frame7"></div>
</div>
<div class="slide-2">
<div class ="fr frame2"></div>
<div class ="fr frame5"></div>
<div class ="fr frame8"></div>