Skip to content

Instantly share code, notes, and snippets.

@MadaraUchiha
MadaraUchiha / testing.md
Created April 14, 2012 14:33
This is a testing to see if SO chat can view it correctly

Test

Let's see if it works correctly!

@MadaraUchiha
MadaraUchiha / dabblet.css
Created April 20, 2012 17:41
Border is not inherited
/**
* Border is not inherited
*/
#parent {
border: 10px dashed black;
}
html, body, ul, li, p, h1, h2 {
margin: 0;
padding: 0;
}
html {
background: #111;
font: normal 11px Verdana, sans-serif;
color: #aaa;
@MadaraUchiha
MadaraUchiha / dabblet.css
Created April 21, 2012 14:49
Negative margin eliminates space
/**
* Negative margin eliminates space
*/
span {
margin:0;
padding:0;
border:1px solid blue;
font-size:256px;
margin-left: -24px;
}
@MadaraUchiha
MadaraUchiha / dabblet.css
Created April 24, 2012 12:27
Floated image and text flowing around it.
/**
* Floated image and text flowing around it.
*/
#image {
background: red;
float: right;
width: 100px;
height: 100px;
border: 2px white solid;
box-shadow: 0px 0px 1px 2px rgba(0,0,0,0.8);
@MadaraUchiha
MadaraUchiha / form_class.php
Created April 27, 2012 16:23
Form class - Generate valid good looking forms with PHP.
<?php
namespace Forms;
/**
* This file is supposed to give a good way of generating forms programmatically with PHP.
*/
/*
* WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING!
* -----------------------------------------------------------------------------------------------------------
* None of the strings you see in the following classes are escaped/secured against any kind of
@MadaraUchiha
MadaraUchiha / dabblet.css
Created April 28, 2012 18:01
Centered Menu
/*
* Centered Menu
*/
* {
padding: 0;
margin: 0;
}
body {
font-family: helvetica ,serif;
@MadaraUchiha
MadaraUchiha / heredoc.php
Created April 29, 2012 21:58
heredoc demonstration
<?php
$sql = <<<SQL
SELECT DISTINCT timeBlocks.date
FROM timeBlocks
WHERE timeBlocks.location = '{$appointmentLocation}'
AND timeBlocks.school = '{$_SESSION["school"]}'
AND timeBlocks.date >= DATE_ADD(curdate(), INTERVAL 1 DAY)
@MadaraUchiha
MadaraUchiha / soccer.php
Created May 11, 2012 20:55
Soccer match simulation
<?
/**
* Player class, to describe a single player.
*/
class Player {
protected $name;
/**
#menu {
width: 900px;
margin: 0 auto;
}
#menu ul {
margin: 0;
padding: 0;
list-style: none;
}