Skip to content

Instantly share code, notes, and snippets.

43 requests ❘ 71.68KB transferred ❘ 8.09s (onload: 3.44s, DOMContentLoaded: 3.18s)
tiff.png
/static/img/icons/system/128
app.png
/static/img/icons/system/128
jar.png
/static/img/icons/system/128
:8000/api/industry/uploadgroup/
HeadersContent
@cvn
cvn / gist:2981807
Created June 24, 2012 05:38
Apache icons workaround for Webfaction (httpd.conf)
<IfModule mod_autoindex.c>
Alias /webfaction-apache-icons /var/www/icons
AddIconByEncoding (CMP,/webfaction-apache-icons/compressed.gif) x-compress x-gzip
AddIconByType (TXT,/webfaction-apache-icons/text.gif) text/*
AddIconByType (IMG,/webfaction-apache-icons/image2.gif) image/*
AddIconByType (SND,/webfaction-apache-icons/sound2.gif) audio/*
AddIconByType (VID,/webfaction-apache-icons/movie.gif) video/*
@cvn
cvn / linkify.js
Created September 7, 2011 01:37
linkify twitter feed
function linkify(tweet_text,entities){
// function borrowed from http://140dev.com/free-twitter-api-source-code-library/twitter-display/linkify-php/
// entities is an object delivered by the Twitter API for each tweet with
// the user @mentions, hastags, and URLs broken out along with their positions
// Constants
var user_mention_url = 'http://twitter.com/',
user_mention_title = '';
hashtag_url = 'http://twitter.com/search?q=',
hashtag_title = '';
@cvn
cvn / class.format.php
Created May 2, 2011 02:14
Vanilla forums (v2) youtube / vimeo mods
<? // Replace LinksCallback() in class.format.php with the below, starting at line 551
protected static function LinksCallback($Matches) {
$Pr = $Matches[1];
$Url = $Matches[2];
if (preg_match('/(www\.)?youtube.com\/watch\?v=([^&]+)/', $Url, $Matches) && C('Garden.Format.YouTube')) {
$ID = $Matches[2];
$Width = 640;
$Height = 390;
$Result = <<<EOT
<div class="Video"><iframe title="YouTube video player" width="$Width" height="$Height" src="http://www.youtube.com/embed/$ID" frameborder="0" allowfullscreen></iframe></div>