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(d, isIE) { | |
var s = d.getElementsByTagName('script')[0]; | |
function async(url) { | |
var scr = []; | |
for (u in url) { | |
var j = scr[scr.length] = d.createElement('script'); | |
j.type = 'text/javascript'; j.async = true; | |
j.src = url[u]; | |
s.parentNode.insertBefore(j, s); | |
} |
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 | |
// Most simple mail() | |
mail( | |
'Luke <[email protected]>', | |
'Testing 1', | |
'This is the main message!!' | |
); | |
// mail() with additional headers |
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
/** | |
* Quick plugin for dt dd collapsible accordian | |
* @author Luke Morton | |
* | |
* @example | |
* | |
// For all <dt> elements in a document | |
$('dt').defAccord(); | |
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
/** | |
* Localise window element and a semi-colon to fix any missing | |
* line endings in previous code. | |
*/ | |
;(function (window, undefined) { | |
/** | |
* Local scope document and $ | |
*/ | |
var document = window.document; |
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 | |
/** | |
* My config | |
* | |
* To use this config simply do the following: | |
* | |
* $config = include('config.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
# Some rewriting | |
RewriteEngine On | |
# Force remove www | |
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC] | |
RewriteRule ^(.*)$ http://%1/$1 [R=301,L] |
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
#!/usr/bin/ruby | |
pid = fork do | |
def find_order | |
# check for order and return one if found | |
end | |
monitor = Fiber.new do | |
# Keep checking | |
loop do |
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
<!doctype html> | |
<html> | |
<head> | |
<title>Testing post values of display:none;</title> | |
</head> | |
<body> | |
<pre><?php var_dump($_POST) ?></pre> | |
<form method="post"> | |
<input type="hidden" name="hidden-display-block" value="1" /> | |
<input type="hidden" name="hidden-display-none" value="2" style="display:none;" /> |
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 | |
require_once('srv.php'); | |
/** | |
* Set root URL | |
*/ | |
Srv::config(array('root' => '/myfreeola-control-panel/e-mail/')); | |
/** | |
* GET /myfreeola-control-panel/e-mail/ |
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 | |
/** | |
* Static singleton class for handling Assets | |
* | |
* @usage | |
* Asset::css('myscript.css'); | |
* | |
* Asset::css(array( | |
* 'my-script.css', | |
* 'another.css', |
OlderNewer