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
<html> | |
<head> | |
<title>My Page</title> | |
<link rel="stylesheet" type="text/css" href="styles.css" /> | |
</head> | |
<body> | |
<div id="mainContent"> | |
<div area="Heading content" id="headingContent" editable="true"> | |
<h2>This is step 6</h2> | |
<p>You can type a bunch of content here and it will only update on one page.</p> |
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
<html> | |
<head> | |
<title>My Page</title> | |
<link rel="stylesheet" type="text/css" href="styles.css" /> | |
</head> | |
<body> | |
<div id="mainContent"> | |
<div id="mainNavigation" menu="Main Navigation"> | |
<div repeat="10" active-class="main-highlight"> | |
<p><a href="" characters="60">This is an item</a></p> |
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
<html> | |
<head> | |
<title>My page</title> | |
<link rel="stylesheet" type="text/css" href="styles.css" /> | |
</head> | |
<body> | |
<div id="mainContent"> | |
<div area="Heading content" id="headingContent" editable="true"> | |
<h2>You can use any formatting here, including images and embeds</h2> | |
<p>If you put in a bunch of content in here, then embed an image just like in the instructional video you'll see you can move it around.</p> |
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 | |
function xpathEscape($query,$default_delim = '"') | |
{ | |
if((strpos($query,'\'') !== FALSE) || | |
(strpos($query,'"') !== FALSE)) | |
{ | |
$quotechars = array('\'','"'); | |
$parts = array(); | |
$current_part = ''; |
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 | |
if(count($_POST)) | |
{ | |
$name = microtime(true).'.txt'; | |
$pid = pcntl_fork(); | |
if($pid) | |
{ | |
die('try here: <a href="out/'.$name.'">'.$name.'</a>'); | |
} |
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 | |
/**** | |
* This script presents an "algorithmic" way of doing a cohort analysis | |
* on your eCommerce customer database. | |
* | |
* This can be useful if you want to automate a lifetime value calculation | |
* based on some data available from a CSV file, database or API. | |
* | |
* The specifics of how your eCommerce system stores this information is | |
* abstracted out to a couple of objects with methods such as |
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 | |
function getPageTitle() | |
{ | |
return mysql_result('SELECT title FROM data',0,'title'); | |
} | |
?> | |
<html> | |
<head> | |
<title><?php echo htmlentities(getPageTitle()); ?></title> | |
</head> |
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 | |
class CurlRequest | |
{ | |
private $curl; | |
private $url; | |
private $method; | |
private $get_fields; | |
private $post_fields; | |
private $sending_file; | |
const POST = 1; |
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 addDueDateToEmailedCard(notification) | |
{ | |
new Notification(notification).addedCard("Emails in").setDue(Trellinator.now().addHours(24)); | |
} |
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 moveAndRenameCardWithHashtag(notification) | |
{ | |
var notif = new Notification(notification); | |
if(parts = /(.+) #(.+)/ig.exec(notif.createdCard("Inbox").name())) | |
notif.card().moveToList(notif.board().findOrCreateList(parts[2])).setName(parts[1]); | |
} |