Skip to content

Instantly share code, notes, and snippets.

- open /app/page-data.inc.php
-- about line 130 add
# @absolute_url
$page->absolute_url = $page->data['@base_url'].'/'.str_replace('./','', $page->file_path);
-- about line 52 (get_thumbnail function) replace with this:
static function get_thumbnail($file_path) {
$thumbnails = array_keys(Helpers::list_files($file_path, '/thumb\.(gif|jpg|png|jpeg)$/i', false));
@kolber
kolber / gist:1433472
Created December 5, 2011 12:39
command line base64
openssl base64 < ajax-loader.gif | tr -d '\n' | pbcopy
@kolber
kolber / nginx.conf
Created October 25, 2011 03:11
Simple virtualhost setup that passes static files to nginx and everything else to Apache
http {
server {
server_name ~^(.+)$;
set $domain $1;
root /var/www/dropbox/$domain;
location / {
proxy_pass http://127.0.0.1:8000;
@kolber
kolber / random-json-images.html
Created October 18, 2011 11:46
Random JSON table
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<title>JSON table</title>
<style>
td { border: 1px solid black; padding: 10px; }
</style>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script>
window.json = [
@kolber
kolber / _grid.scss
Created March 4, 2011 01:24
A simple, extendable scss grid system generator
/*
Usage
-----
In your main scss file, add the following three lines.
$show-grid: true;
$container-id: container;
@import "grid";
To hide the grid background and borders, change the first line to
@kolber
kolber / export.php
Created February 24, 2011 03:40
Stacey, A quick and dirty HTML export script
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<title>Export</title>
<style> div { display: none; }</style>
</head>
<body>
<?php
# Usage:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>expanding image</title>
<style>
.wrapper { margin: 0px auto; padding: 0px 320px; *width: 920px; max-width: 920px; border: 3px solid red; }
.wrapper img { width: 100%; -ms-interpolation-mode: bicubic; }
</style>
</head>
@kolber
kolber / sequential-gallery.html
Created January 28, 2011 03:35
A dead simple, sequential image gallery (good for pulling together quick in-browser design presentations)
@kolber
kolber / N3RD5
Created January 27, 2011 05:54 — forked from jmac/NERDS
Y0u guy5 ar3 th3 gr34t35t.
/\n\s+\n/\n\n/