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
RewriteEngine On | |
RewriteCond %{REQUEST_URI} !=/unavailable.html | |
RewriteRule ^ /unavailable.html [R=301] |
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
// table called categories, with an id and a parent_category_id | |
// useful for counting number of subcategories per parent category | |
SELECT *, | |
(SELECT count(*) FROM categories c1 where c1.id=categories.parent_category_id) | |
as TheCount FROM `categories` |
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 | |
// ver 1.1.20201105a | |
// | |
// Most recent: https://gist.github.com/jcamachott/6126869 | |
// | |
// should always be called uncached | |
// Usage: | |
// [[!isAdmin:is=`1`:then=`Do this`:else=`Do that`? &check=`mgr` &disable=`0`]] | |
// | |
// $check - get (has GET var admin=1) or mgr (manager logged in) or ip (ip address set in ++admin_ip) |
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
Verifying that +jcamacho is my openname (Bitcoin username). https://onename.com/jcamacho |
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 | |
/** | |
* Snippet for displaying Image+ thumbnails in Collections views | |
* | |
* Based on snippet ImagePlus from @package imageplus by Alan Pich <[email protected]> | |
* @author John Camacho | |
* | |
* @snippet ImagePlus_collections | |
* @var string $tvname Name of your TV | |
* @var string $phpThumbParams Phpthumb parameters |
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 | |
// ver 1.1.20150717 | |
// | |
// Most recent: https://gist.github.com/jcamachott/dfddd63605a375f29e77 | |
// | |
// Usage: | |
// [[randomString? &strings=`one|two|three|four`]] | |
// | |
// $strings: string |
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 | |
/* | |
Gist: https://gist.github.com/jcamachott/031e60748bb06314758d | |
Version: 1.0.20150718 | |
hasChildren: returns 1 or 0 if specified ID has children | |
Options: | |
&id=`` // use current doc id - [[*id]] or if in tpl, use [[+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
/* | |
Taken from https://css-tricks.com/responsive-data-tables/ | |
*/ | |
@media | |
only screen and (max-width: 760px), | |
(min-device-width: 768px) and (max-device-width: 1024px) { | |
/* Force table to not be like tables anymore */ | |
table, thead, tbody, th, td, tr { |
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
<div id="mini-calendar"> | |
<div class="clndr"> | |
<div class="clndr-controls"> | |
<div class="clndr-control-button"><span class="clndr-previous-button">previous</span> | |
</div> | |
<div class="month">February 2016</div> | |
<div class="clndr-control-button rightalign"><span class="clndr-next-button">next</span> | |
</div> | |
</div> | |
<table class="clndr-table" border="0" cellspacing="0" cellpadding="0"> |
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
RewriteEngine On | |
RewriteBase / | |
# Add all the IP addresses of people that are helping in development | |
# and need to be able to get past the maintenance mode. | |
# One might call this the 'allow people list' | |
RewriteCond %{REMOTE_HOST} !^77\.234\.42\.555 | |
RewriteCond %{REMOTE_HOST} !^190\.213\.189\.555 |
OlderNewer