Skip to content

Instantly share code, notes, and snippets.

Avatar

Maciej Łebkowski mlebkowski

View GitHub Profile
@mlebkowski
mlebkowski / dabblet.css
Created Feb 16, 2012
The first commented line is your dabblet’s title
View dabblet.css
/**
* The first commented line is your dabblet’s title
*/
* {
border: 1px dashed silver; width: 100px; height: 100px;
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height:100%;
}
@mlebkowski
mlebkowski / dabblet.css
Created Mar 1, 2012
grid layout for forms
View dabblet.css
/**
* grid layout for forms
*/
fieldset, form, input, select, ul, li, label { margin: 0; padding: 0; border: 0; list-style: none; }
body {
font: 13px Arial, 'Helvetica Neue', Helvetica, sans-serif;
}
.container12 {
width: 960px;
@mlebkowski
mlebkowski / dabblet.css
Created Mar 15, 2012
grid layout for forms
View dabblet.css
/**
* grid layout for forms
*/
fieldset, form, input, select, ul, li, label { margin: 0; padding: 0; border: 0; list-style: none; }
body {
font: 13px Arial, 'Helvetica Neue', Helvetica, sans-serif;
}
.container12 {
width: 960px;
View dice.php
<?php
function nassau_dice_filter($o) {
$preg = '/\[dice=(?<num>\d*)[kd](?<dice>\d+)\]((?<res>[^\[]*)\[\/dice\])?/i';
$o->Msg = preg_replace_callback($preg, 'nassau_dice_parse', $o->Msg);
}
function nassau_dice_parse($m) {
if (false == empty($m['res'])) return $m[0];
$dice = $m['dice'];
@mlebkowski
mlebkowski / dabblet.css
Created Apr 17, 2012
List style on <LI>
View dabblet.css
/**
* List style on <LI>
*/
@mlebkowski
mlebkowski / dabblet.css
Created Apr 18, 2012
List style on <LI>
View dabblet.css
/**
* List style on <LI>
*/
View SplClassLoader.php
<?php
/**
* SplClassLoader implementation that implements the technical interoperability
* standards for PHP 5.3 namespaces and class names.
*
* http://groups.google.com/group/php-standards/web/final-proposal
*
* // Example which loads classes for the Doctrine Common package in the
* // Doctrine\Common namespace.
@mlebkowski
mlebkowski / dabblet.css
Created Jun 5, 2012
The first commented line is your dabblet’s title
View dabblet.css
/**
* The first commented line is your dabblet’s title
*/
@import url("http://www.bao.pl/Cache/resources/4c813eb214517295165624039eb48a34.css");
View params.php
<?php
$str = "SQL :param1 :param2 END_SQL";
$params = array (
'param1' => 'param1 value',
'param2' => 'param2 value'
);
echo preg_replace_callback('/:([a-z0-9]+)/', function ($m) use ($params) {
return '\'' . mysql_escape_string($params[$m[1]]) . '\'';
@mlebkowski
mlebkowski / ZnanyLekarz.xml
Created Sep 5, 2012
ZnanyLekarz Coding Standards
View ZnanyLekarz.xml
<?xml version="1.0" encoding="UTF-8"?>
<code_scheme name="ZnanyLekarz">
<option name="OTHER_INDENT_OPTIONS">
<value>
<option name="INDENT_SIZE" value="4" />
<option name="CONTINUATION_INDENT_SIZE" value="4" />
<option name="TAB_SIZE" value="4" />
<option name="USE_TAB_CHARACTER" value="true" />
<option name="SMART_TABS" value="true" />
<option name="LABEL_INDENT_SIZE" value="0" />
You can’t perform that action at this time.