Skip to content

Instantly share code, notes, and snippets.

@alixaxel
alixaxel / 960_fluid_nested.css
Created July 13, 2011 04:36
Support for Nested Fluid Grids in adapt.js
.container_12 .grid_2 > .grid_1 {
width: 48%;
}
.container_12 .grid_2 > .grid_1.alpha,
.container_12 .grid_2 > .grid_1.omega {
width: 49%;
}
.container_12 .grid_3 > .grid_1 {
width: 31.333%;
}
<?php
function Filter($data, $control = true, $encoding = null)
{
if (is_array($data) === true)
{
$result = array();
foreach ($data as $key => $value)
{
<?php
function Coordinates()
{
if (count($arguments = func_get_args()) > 1)
{
foreach ($arguments as $key => $value)
{
$arguments[$key] = sprintf('%04s', ph()->Math->Base(10, 62, round($value + 180, 4) * 10000));
}
@alixaxel
alixaxel / hacks.css
Created November 20, 2011 20:59 — forked from xeoncross/hacks.css
CSS hacks
/*
Comprehensive List of Browser-Specific CSS Hacks
http://paulirish.com/2009/browser-specific-css-hacks/
*/
/***** Selector Hacks ******/
/* IE6 and below */
* html #uno { color: red }
@alixaxel
alixaxel / DB.php
Created December 8, 2011 22:03
Docblock example on phunction::DB()
<?php
/**
* Database wrapper for MySQL, PostgreSQL, SQLite and Firebird.
*
* This method provides a simplified and secure way (using prepared statements and un-named variadic parameters)
* to connect and query databases via PDO. The database connection is kept in an internal singleton registry.
*
* ----
*
.grid {
margin: 0 auto;
width: 480px;
._01 {
background-color: rgb(109, 51, 193);
width: 23.000000%;
}
._02 {
background-color: rgb(30, 9, 171);
.grid {
margin: 0 auto;
width: 480px;
._(@n) {
width: 100% / 8 * @n - 2 * 1%;
}
._01 {
._(1);
@alixaxel
alixaxel / 01_grid.less
Created December 13, 2011 17:24
4 Columns - Fixed, Fluid & Padded Grid
.grid {
margin: 0 auto;
width: 960px;
._01 {
width: 960px / 4 * 1 - 2 * 10px;
}
._02 {
width: 960px / 4 * 2 - 2 * 10px;
<?php
/**
* The MIT License
* http://creativecommons.org/licenses/MIT/
*
* Copyright (c) Alix Axel <alix.axel@gmail.com>
**/
class phunction_DB_Mock extends phunction
@alixaxel
alixaxel / styleshit.html
Created February 9, 2012 03:44
styleshit - Responsive Preview
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>styleshit 1.0</title>
<style type="text/css">
iframe {
border: none;
}