Skip to content

Instantly share code, notes, and snippets.

@erikjung
erikjung / dabblet.css
Created June 18, 2012 22:47
A Tabs Component
/**
* A Tabs Component
*/
* {
margin: 0;
padding: 0;
}
body {
@erikjung
erikjung / dabblet.css
Created June 28, 2012 20:13
Webkit Elastic Overflow Scrolling
/**
* The first commented line is your dabblet’s title
*/
.container {
overflow-x:scroll;
overflow-y: hidden;
width: 500px;
height: 500px;
-webkit-overflow-scrolling: touch;
@erikjung
erikjung / dabblet.css
Created July 1, 2012 20:01
Modular Scale
/* Modular Scale */
* {margin:0}
html {background:url(//griddle.it/1000-1-999?color=white&num=0&horizontal=27) 0 1px}
h1 {font:45px/54px sans-serif;margin-top:54px}
h2 {font:36px/45px sans-serif;margin-top:45px}
h3 {font:27px/36px sans-serif;margin-top:36px}
body {font:18px/27px sans-serif;max-width:30em;margin:27px auto;}
@erikjung
erikjung / gist:3030803
Created July 2, 2012 03:20
Storing and fetching image data from MongoDB with PHP
<!doctype html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<?php
/*
@erikjung
erikjung / gist:3030820
Created July 2, 2012 03:25
Mass-deleting old CloudApp uploads with PHP using CloudApp API library
<pre>
<?php
require 'Cloud/API.php';
$cloud = new Cloud_API('username', 'password');
$items = $cloud->getItems(1, 1000);
$exp_hours = 120;
function hours_old($created_at) {
return (time() - strtotime($created_at)) / 60 / 60;
@erikjung
erikjung / dabblet.css
Created July 4, 2012 01:16
2012-07-03
/**
* 2012-07-03
*/
@import url(https://dl.dropbox.com/u/48589/foundation3/stylesheets/foundation.css);
body {
background-color: #ddd;
font-family: courier;
@erikjung
erikjung / dabblet.css
Created July 8, 2012 07:10
Button, -webkit-filter, and transitions
/* Button, -webkit-filter, and transitions */
body {
background: #555;
font: 16px sans-serif;
}
.button {
display: inline-block;
padding: .5rem 2rem;
@erikjung
erikjung / gist:3079806
Created July 9, 2012 23:39
PHP 5.4 Namespace-based Autoloader
<?php
// Probably unnecessary, but wanted to test the waters of 5.4
trait NamespaceConverter
{
function nsToPath($class) {
return str_replace('\\', DIRECTORY_SEPARATOR, $class) . '.php';
}
}
@erikjung
erikjung / config.rb
Created July 11, 2012 23:50
Testing Compass Vertical Rhythm Loveliness
http_path = "/"
css_dir = ""
sass_dir = ""
images_dir = ""
javascripts_dir = ""
output_style = :expanded
line_comments = false
preferred_syntax = :scss
@erikjung
erikjung / gist:3131472
Created July 17, 2012 19:33
List functions with SASS
@function colors($base) {
@return darken($base, 10%) $base lighten($base, 10%);
}
body {
color: nth(colors(#ff0000), 1);
}