View Default (OSX).sublime-keymap
This file contains 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
Show hidden characters
[ | |
{ "keys": ["super+0"], "command": "reset_font_size_to_user_defaults" } | |
] |
View craft_country_region.txt
This file contains 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
{"options":[{"label":"Afghanistan","value":"AF","default":""},{"label":"Aland Islands","value":"AX","default":""},{"label":"Albania","value":"AL","default":""},{"label":"Algeria","value":"DZ","default":""},{"label":"American Samoa","value":"AS","default":""},{"label":"Andorra","value":"AD","default":""},{"label":"Angola","value":"AO","default":""},{"label":"Anguilla","value":"AI","default":""},{"label":"Antarctica","value":"AQ","default":""},{"label":"Antigua and Barbuda","value":"AG","default":""},{"label":"Argentina","value":"AR","default":""},{"label":"Armenia","value":"AM","default":""},{"label":"Aruba","value":"AW","default":""},{"label":"Australia","value":"AU","default":""},{"label":"Austria","value":"AT","default":""},{"label":"Azerbaijan","value":"AZ","default":""},{"label":"Bahamas","value":"BS","default":""},{"label":"Bahrain","value":"BH","default":""},{"label":"Bangladesh","value":"BD","default":""},{"label":"Barbados","value":"BB","default":""},{"label":"Belarus","value":"BY","default":""},{"lab |
View craft_state_region.txt
This file contains 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
{"options":[{"label":"Alabama","value":"AL","default":""},{"label":"Alaska","value":"AK","default":""},{"label":"Arizona","value":"AZ","default":""},{"label":"Arkansas","value":"AR","default":""},{"label":"California","value":"CA","default":""},{"label":"Colorado","value":"CO","default":""},{"label":"Connecticut","value":"CT","default":""},{"label":"Delaware","value":"DE","default":""},{"label":"District of Columbia","value":"DC","default":""},{"label":"Florida","value":"FL","default":""},{"label":"Georgia","value":"GA","default":""},{"label":"Hawaii","value":"HI","default":""},{"label":"Idaho","value":"ID","default":""},{"label":"Illinois","value":"IL","default":""},{"label":"Indiana","value":"IN","default":""},{"label":"Iowa","value":"IA","default":""},{"label":"Kansas","value":"KS","default":""},{"label":"Kentucky","value":"KY","default":""},{"label":"Louisiana","value":"LA","default":""},{"label":"Maine","value":"ME","default":""},{"label":"Maryland","value":"MD","default":""},{"label":"Massachusetts","va |
View db.php
This file contains 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 | |
add_filter ( 'pre_option_home', 'env_url' ); | |
add_filter ( 'pre_option_siteurl', 'env_url' ); | |
function env_url() { | |
return 'http://'.strtolower($_SERVER['HTTP_HOST']); | |
} |
View gist:5467788
This file contains 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
// Open external links and PDFs in a new window | |
$("a[href^='http'], a[href$='.pdf']").each(function() { | |
if(this.href.indexOf(location.hostname.replace(/www./gi, "")) == -1 || this.href.lastIndexOf('.pdf') !== -1) { | |
// Ensure subdomains are not counted as external | |
if(this.href.indexOf('mywebsite.com') == -1) { | |
$(this).click(function() { | |
window.open(this.href, "_blank"); | |
return false; | |
}); | |
} |
View gist:5213767
This file contains 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
In mod.forum_core.php around line 11003 find: | |
// Single Variables | |
foreach ($this->EE->TMPL->var_single as $key => $val) | |
{ | |
// parse {post_total} | |
if ($key == 'post_total') | |
{ | |
$tagdata = $this->EE->TMPL->swap_var_single($key, $row['thread_total'], $tagdata); | |
} |
View wget.sh
This file contains 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: | |
# -E Adjust extension. | |
# -k Convert links. | |
# -N Enable timestamping. | |
# -np No parent. | |
# -p Page requisites. | |
# -r Recursive. | |
# -w1 The time to wait between requests. | |
# --random-wait Wait times 0.5 to 1.5. |
View gist:1418214
This file contains 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
{exp:low_replace | |
regex="yes" | |
find="(<\/(.*)>)(\s+)$" | |
replace="SPACE<a class='more' href='{title_permalink=bulletin}'>[read more]</a>$1" | |
} | |
{blog_excerpt} | |
{/exp:low_replace} |
View Dynamically add images to Cycle
This file contains 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
------------ | |
JS | |
------------ | |
// After all images load, not dom-ready | |
$(window).load(function(){ | |
if(!$("#slideshow").length) return; | |
// Images to add to slideshow |
View Portable EE2 config variables
This file contains 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
// Config overrides - http://expressionengine.com/wiki/EE_2_Config_Overrides/ | |
$config['index_page'] = ''; | |
$config['site_url'] = "http://${_SERVER['HTTP_HOST']}/"; | |
$config['cp_url'] = $config['site_url'].SYSDIR."/index.php"; | |
$config['captcha_url'] = "http://${_SERVER['HTTP_HOST']}/images/captchas/"; | |
$config['emoticon_path'] = "http://${_SERVER['HTTP_HOST']}/images/smileys/"; | |
$config['photo_url'] = "http://${_SERVER['HTTP_HOST']}/images/member_photos/"; | |
$config['sig_img_url'] = "http://${_SERVER['HTTP_HOST']}/images/signature_attachments/"; | |
$config['theme_folder_url'] = "http://${_SERVER['HTTP_HOST']}/themes/"; | |
$config['theme_folder_path'] = "${_SERVER['DOCUMENT_ROOT']}/themes/"; |
NewerOlder