Skip to content

Instantly share code, notes, and snippets.

View mlebkowski's full-sized avatar
🤷‍♀️

Maciej Łebkowski mlebkowski

🤷‍♀️
View GitHub Profile
@mlebkowski
mlebkowski / dabblet.css
Created February 16, 2012 11:13
The first commented line is your dabblet’s title
/**
* 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 March 1, 2012 09:28
grid layout for forms
/**
* 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 March 15, 2012 11:15
grid layout for forms
/**
* 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;
<?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 April 17, 2012 07:51
List style on <LI>
/**
* List style on <LI>
*/
@mlebkowski
mlebkowski / dabblet.css
Created April 18, 2012 10:18
List style on <LI>
/**
* List style on <LI>
*/
<?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 June 5, 2012 08:30
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
@import url("http://www.bao.pl/Cache/resources/4c813eb214517295165624039eb48a34.css");
<?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 September 5, 2012 13:52
ZnanyLekarz Coding Standards
<?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" />