Skip to content

Instantly share code, notes, and snippets.

View czterystaczwarty's full-sized avatar

Tomasz Szopiński czterystaczwarty

View GitHub Profile
@czterystaczwarty
czterystaczwarty / pre-commit.sh
Created March 8, 2016 08:43 — forked from chadmaughan/pre-commit.sh
A git pre commit hook that runs the test task with the gradle wrapper
#!/bin/sh
# this hook is in SCM so that it can be shared
# to install it, create a symbolic link in the projects .git/hooks folder
#
# i.e. - from the .git/hooks directory, run
# $ ln -s ../../git-hooks/pre-commit.sh pre-commit
#
# to skip the tests, run with the --no-verify argument
# i.e. - $ 'git commit --no-verify'
#!/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 / facebook_like-box_responsive.css
Created October 29, 2012 23:43 — forked from smeranda/facebook_like-box_responsive.css
Flexible width layout for Facebook Like Box/Activity Stream to use in Responsive Designs
/*
Make the Facebook Like box responsive (fluid width)
https://developers.facebook.com/docs/reference/plugins/like-box/
*/
/* This element holds injected scripts inside iframes that in some cases may stretch layouts. So, we're just hiding it. */
#fb-root {
display: none;
}
@czterystaczwarty
czterystaczwarty / icmp.php
Created October 22, 2012 13:16 — forked from spiechu/icmp.php
Class ICMPPing constructs raw ICMP echo packet, sends it and echoes the response
<?php
// See the corresponding blog entries (in Polish):
// http://spiechu.pl/2012/05/16/tworzenie-pakietow-icmp-w-php
// http://spiechu.pl/2012/05/26/w-miare-bezpieczne-uruchamianie-skryptow-php-poprzez-shell_exec
class ICMPPing
{
const TYPE_REQUEST = 0x08;
const TYPE_RESPONSE = 0x00;
@czterystaczwarty
czterystaczwarty / _media-queries.scss
Created October 19, 2012 20:29 — forked from anthonyshort/_media-queries.scss
Media Queries in Sass
// Media Queries in Sass 3.2
//
// These mixins make media queries a breeze with Sass.
// The media queries from mobile up until desktop all
// trigger at different points along the way
//
// And important point to remember is that and width
// over the portrait width is considered to be part of the
// landscape width. This allows us to capture widths of devices
// that might not fit the dimensions exactly. This means the break
<!doctype html>
<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en"> <![endif]-->
<!--[if IE 7]> <html class="no-js ie7 oldie" lang="en"> <![endif]-->
<!--[if IE 8]> <html class="no-js ie8 oldie" lang="en"> <![endif]-->
<!-- Consider adding an manifest.appcache: h5bp.com/d/Offline -->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<head>
<meta charset="utf-8">
@czterystaczwarty
czterystaczwarty / gist:3860413
Created October 9, 2012 18:08
minimal html5 page
<!doctype html>
<html lang=en>
<head>
<meta charset=utf-8>
<title>awesome first page</title>
</head>
<body>
<script type="text/javascript">
@czterystaczwarty
czterystaczwarty / index.html
Created September 27, 2012 09:09 — forked from alexrinass/index.html
XHTML Base Template
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf8" />
<meta name="description" content="" />
<meta name="keywords" content="" />
<title>Untitled</title>
<link rel="stylesheet" href="/stylesheets/screen.css" type="text/css" media="screen,projection" />