This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$stream = $fs->readStream($file); | |
// send the right headers | |
header("Content-Type: " . $fs->getMimetype($file)); | |
header("Content-Length: " . $fs->getSize($file)); | |
header("Content-disposition: attachment; filename=\"" . basename($file) . "\""); | |
// dump the attachement and stop the script |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Converts any valid PHP callable into a Closure. Requires PHP 5.4.0+. | |
* | |
* The ramifications of this are many, but basically it means that any function | |
* or method can be converted into a Closure, bound to another scope, and | |
* executed easily. Works properly even with private methods. | |
* | |
* - On success, returns a Closure corresponding to the provided callable. | |
* - If the parameter is not callable, issues an E_USER_WARNING and returns a |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* http://twitter.github.com/bootstrap/scaffolding.html#responsive */ | |
/* Landscape phones and down */ | |
@media (max-width: 480px) { ... } | |
/* Landscape phone to portrait tablet */ | |
@media (max-width: 768px) { ... } | |
/* Portrait tablet to landscape and desktop */ | |
@media (min-width: 768px) and (max-width: 940px) { ... } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function(){ | |
// colorbox | |
if ($('#modal').length > 0) { | |
var modalConfig = { | |
inline : true, | |
href : "#modal", | |
opacity : .75, | |
onLoad:function(){ | |
$('#modal').css('display','block'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT * | |
FROM | |
( | |
SELECT cp.cat_id, cp.entry_id, ct.title, | |
@num := if(@group = cp.cat_id, @num + 1, 1) as row_number, | |
@group := cp.cat_id as group_key | |
FROM (SELECT @group:=null,@num:=0) n | |
CROSS JOIN exp_category_posts cp | |
LEFT JOIN exp_channel_titles ct on cp.entry_id = ct.entry_id | |
ORDER BY cp.cat_id |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Explanation: | |
# `--adjust-extension` | |
# Add `.html` file extension to any files of type `application/xhtml + xml` or `text/html`. | |
# Add `.css` file extension to any files of type `text/css`. | |
# | |
# `--convert-links` | |
# Convert full links to relative. | |
# | |
# `--level=inf` (`-l inf`) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// General | |
button_tile_map : true, | |
editor_selector : 'lg_mceEditor', | |
mode:'textareas', | |
theme : 'advanced', | |
// Cleanup/Output | |
apply_source_formatting : true, | |
convert_fonts_to_spans : true, | |
convert_newlines_to_brs : false, |