Requires CSS Browser Selector to disable on IE8 and Android
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
// Returns either the $light or $dark color by deciding which contrasts more | |
// with $color using the YIQ color space (https://en.wikipedia.org/wiki/YIQ). | |
// This can be used to get a readable font color for a given background color. | |
// | |
// When $color is null, this function returns null. | |
@function contrast-color($color, $dark: 'black', $light: 'white') { | |
@if $color == null { | |
@return null; | |
} |
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 // application/src/Helpers/CanonicalUrls.php | |
namespace Application\Src\Helpers; | |
use Concrete\Core\Routing\Redirect; | |
use Config; | |
use Page; | |
/** | |
* Class CanonicalUrls |
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
### Archives ### | |
# It's better to unpack these files and commit the raw source because | |
# git has its own built in compression methods. | |
*.7z | |
*.jar | |
*.rar | |
*.zip | |
*.gz | |
*.bzip | |
*.bz2 |
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
User-agent: * | |
Disallow: / |
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
-- create new Service in Automator | |
-- set input to "folders" in "Finder" | |
-- add new task: Run AppleScript | |
on run {input, parameters} | |
set _path to POSIX path of item 1 of input | |
tell application "iTerm" | |
activate | |
set myterm to (make new terminal) |
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
# concrete5 | |
# files/.htaccess | |
# NOTE: This doesn't work for images that are created with concrete5's getThumbnail() | |
# Attempt to load files from production if they're not in our local version | |
<IfModule mod_rewrite.c> | |
RewriteEngine on | |
Options +FollowSymlinks -MultiViews | |
RewriteBase / | |
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
function targetBlank() { | |
// remove subdomain of current site's url and setup regex | |
var internal = location.host.replace("www.", ""); | |
internal = new RegExp(internal, "i"); | |
var a = document.getElementsByTagName('a'); // then, grab every link on the page | |
for (var i = 0; i < a.length; i++) { | |
var href = a[i].host; // set the host of each link | |
if( !internal.test(href) ) { // make sure the href doesn't contain current site's host | |
a[i].setAttribute('target', '_blank'); // if it doesn't, set attributes |