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
//Finding text in between <span> tags with data binding that needs escape | |
<span[^<>]*data-bind="html:\$data.title"[^<>]*>[\s\S]*?</span> |
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
//MySQL queries and other code to generate the $users array ommited | |
//============================================================== | |
//============================================================== | |
//============================================================== | |
$todayDate = date('m.d.y'); | |
$fileName = 'Sign-In Sheet ' .$todayDate . '.pdf'; | |
include("mpdf60/mpdf.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
<?php | |
date_default_timezone_set('America/New_York'); | |
ini_set('display_errors', 1); | |
ini_set('display_startup_errors', 1); | |
error_reporting(E_ALL); | |
$myFile = "tmp/log.txt"; | |
$fh = fopen($myFile, 'a+') or die("can't open file"); | |
if ($fh){ |
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 | |
// using SendGrid's PHP Library | |
// https://github.com/sendgrid/sendgrid-php | |
// If you are using Composer (recommended) | |
require 'vendor/autoload.php'; | |
// If you are not using Composer | |
// require("path/to/sendgrid-php/sendgrid-php.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
Array | |
( | |
[0] => Array | |
( | |
[meeting_name] => myMeeting1 | |
[ip] => 00.00.00.00 | |
[response] => 250 message accepted for delivery | |
[event] => delivered | |
[email] => [email protected] | |
[timestamp] => 1485811028 |
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
// Functionality to sort the event buttons by date using jQuery | |
var $results = $('.mainDivClass'); //This could be an id as well | |
var $itemBtn = $results.children('.individualItemClass'); //This could be an id as well | |
$itemBtn.detach(); | |
$itemBtn.sort(function(a,b){ | |
return a.id > b.id; | |
}); |
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
<!-- Using PHP's mail() function--> | |
<?php | |
$to = '[email protected]'; | |
$subject = 'Subject line goes here'; | |
$message = 'Hi, this is me!'; | |
$headers = 'From: [email protected]' . "\r\n" . | |
'Reply-To: [email protected]' . "\r\n" . | |
'X-Mailer: PHP/' . phpversion(); |
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
//Javascript hack from Fullstack Lesson #1: Javascript Craigslist for Fun and Profit | |
var emails = ""; | |
$(".txt").find("a.hdrlnk").map(function(i, el) { return el }) | |
.each(function(i, el) { | |
$.get(el.href, function(body) { | |
$.get( $(body).find("#replylink")[0].href, function(linkbody) { | |
var email = $(linkbody).find('a[href^="mailto:"]')[0].innerText + ','; | |
emails += email; | |
}) |
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
Git commands | |
CREATE NEW BRANCH | |
git checkout -b new_branch_name | |
PUSH NEW BRANCH TO REMOTE SERVER | |
git push -u origin new_branch_name | |
SWITCH BRANCHES | |
git checkout branch_name |
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
/* | |
* Simple screenshot test using CasperJS to capture an entire web page | |
* by Paola Garcia Cardenas | |
*/ | |
// set screenshot URL variable | |
var screenshotUrl = 'http://www.paolagarcia.com'; | |
// set viewport size | |
casper.options.viewportSize = {width: 1928, height: 1274}; |
NewerOlder