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
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js" type="text/javascript"></script> | |
<script type="text/javascript"> | |
if (typeof jQuery === 'undefined') { | |
var e = document.createElement('script'); | |
e.src = 'js/jquery-1.4.3-min.js'; | |
e.type='text/javascript'; | |
document.getElementsByTagName('head')[0].appendChild(e); | |
} | |
</script> |
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
<div id="sales" class="sub_banner"> | |
<div class="max"> | |
<h2>Contact [CountryName] support</h2> | |
<a href="[callback_url]" class="callback">Arrange callback</a> | |
<ul class="contacts"> | |
<li id="hcard-[forename]-[surname]" class="vcard{if usr_region}{if (usr_region != region)} secondary{endif}{endif}"> | |
<h3 class="fn"><a href="mailto:[forename].[surname]@spilasers.com" class="email" title="Email [Forename]">[Forename] [Surname]</a></h3> | |
<ul> | |
<li class="img"><img class="photo" src="foo" alt="[Forename] [Surname]"></li> | |
{if region}<li class="title">[CountryName] [Region]</li>{endif} |
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
// Add skip links to sections | |
SECT.add_skip = function() { | |
// Create a placeholder we can append to | |
var $skip = $('<div class="skip"></div>'); | |
$('.body .section').each(function(){ | |
_section = $(this); | |
// Check the section has an id we can link to and a subheading | |
if (_section.attr('id').length && (_section.find('h2').length > 0) ) { |
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
<!-- Example cell with JavaScript on --> | |
<td class="linked"> | |
<a href="/Datasheets/redPOWER_R4/100-400W_RS_series.aspx?" title="View RS datasheet"> | |
<a title="View RS datasheet" href="/Datasheets/redPOWER_R4/100-400W_RS_series.aspx?"> | |
<em class="good">Good</em> | |
</a> | |
</a> | |
</td> | |
<!-- Same cell with JavaScript off (HTML sent to browser) --> |
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
<!-- The nested structure is at present like this --> | |
<div class="panel vcard" id="[hcard-forename-surname]"> | |
<div class="header"> | |
<h2 class="fn h3">[Forename] [Surname]</h2> | |
<div class="title">[Job title]</div> | |
</div> | |
<div class="figure left1of3"> | |
<img alt="[Forename] [Surname]" src="[image_url]" class="photo"> | |
</div> | |
<div class="bio"> |
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
/* | |
Craft permits Markdown in its field instructions but doesn't permit raw HTML. | |
That's a pain when you want your field instructions to have links to documentation | |
elsewhere, because one would want such links to open in a new window. | |
So, with Lindsey DiLoreto's 'Control Panel JS' plugin (https://github.com/lindseydiloreto/craft-cpjs) installed, | |
just use it to add… | |
*/ | |
var links = document.querySelectorAll(".instructions a"), i; |
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
set myValues to {"filename.ext", "filename.ext"} | |
tell application "Finder" to set fileList to files of target of front Finder window as alias list | |
set matchedFiles to {} | |
repeat with aFile in my fileList | |
repeat with aValue in myValues | |
tell application "System Events" to if aFile's name contains (contents of aValue) then set end of matchedFiles to (aFile as text) | |
end repeat | |
end repeat |
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
UPDATE table_name | |
SET field_to_update = CASE id | |
WHEN n THEN 'Text value' | |
END | |
WHERE id IN (n) |
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
for f in *; do mv "$f" "$f.tmp"; mv "$f.tmp" "`echo $f | tr "[:upper:]" "[:lower:]"`"; done |
OlderNewer