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
@mixin link( | |
$text-color : black, | |
$text-color-hover: green, | |
$line-color : blue, | |
$line-color-hover: red, | |
$background-color: white | |
) { | |
color: $text-color; | |
span { |
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
-- Get a list of all "current messages" in Outlook. | |
tell application "Microsoft Outlook" | |
set currentMessages to the current messages | |
end tell | |
-- Loop through the messages. | |
repeat with eachMessage in currentMessages | |
tell application "Microsoft Outlook" | |
-- Only notify about unread messages. | |
if is read of eachMessage is false then |
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 | |
// sample MySQL database connection and query to get a dataset | |
$dbConnection = mysql_connect("localhost", "usename", "password"); | |
mysql_select_db("foo", $dbConnection); | |
$dbQuery = "SELECT t.table_id, t.data FROM table AS t ORDER BY t.table_id ASC"; | |
// set how many items to show per page | |
$limit = 50; | |
// count the total number of items that the query returns |
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
function externalLinks() { | |
var domainList = ["mydomain.com", "mycdn.com"]; // Your domain(s). | |
// Links to anything on these domains are considered internal. | |
// Enclose each domain in quotes, separated by a comma. (e.g. "domain1", "domain2") | |
// You do not need to list sub-domains. This function already assumes all sub-domains | |
// are internal. | |
// Open external links in a new window? true = yes, false = no | |
var newWindow = true; |
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
function auto_link($text) { | |
$pattern = '/(((http[s]?:\/\/(.+(:.+)?@)?)|(www\.))[a-z0-9](([-a-z0-9]+\.)*\.[a-z]{2,})?\/?[a-z0-9.,_\/~#&=:;%+!?-]+)/is'; | |
$text = preg_replace($pattern, ' <a href="$1">$1</a>', $text); | |
// fix URLs without protocols | |
$text = preg_replace('/href="www/', 'href="http://www', $text); | |
return $text; | |
} |