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
<html> | |
<head> | |
<link rel="stylesheet" href="/examples/stylesheets/ui-lightness/jquery-ui-1.8.16.custom.css" type="css"> | |
<script type="text/javascript" src="/examples/javascripts/jquery.min.js"></script> | |
<script type="text/javascript" src="/examples/javascripts/jquery.base64.min.js"></script> | |
<script type="text/javascript" src="/examples/javascripts/jquery-ui-1.8.16.custom.min.js"></script> | |
<script type="text/javascript" src="/examples/javascripts/jquery.tmpl.min.js"></script> | |
</head> | |
<body> |
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
<!--- 2/16/2016 Exiv2(filePath, ExePath) | |
James Moberg - SunStar Media | |
Requires command-line version of Exiv2 http://www.exiv2.org/ | |
All data returned in a struct. Based on filetype & metadata, keys may not always exist. | |
Latitude/Longitude keys w/decimal values added. All dates formatted to M/D/YYYY HH:MM:SS format. | |
Similar to ImageGetEXIFMetaData(imageNew( imageFilePath )), but much faster. (Exiv2 = 16-47ms; CF = 500-920ms) | |
---> | |
<cffunction name="Exiv2" returntype="struct" output="no"> | |
<cfargument name="filepath" type="string" required="true"> | |
<cfargument name="EXEpath" default="C:\Exiv2\Exiv2.exe" type="string" required="false"> |
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
<cfhttp url="http://target_website_with-table.com/" username="#CGI.Http_User_Agent#"></cfhttp> | |
<cfscript> | |
jsoup = CreateObject("java", "org.jsoup.Jsoup"); | |
HTMLDocument = jsoup.parse(CFHTTP.fileContent); | |
/* Identify a specific table containing the data to scrape */ | |
TheTable = HTMLDocument.select("##tableByID"); | |
/* Alternate DOM select methods if table doesn't have a unique ID |
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
<!DOCTYPE HTML> | |
<html lang="en-US"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>SendGrid Demo</title> | |
</head> | |
<body> | |
<form action="process.cfm" method="POST"> | |
<div> | |
<label for="emails"> |
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
server { | |
listen 80; | |
server_name observium.yourdomain.com; | |
access_log /var/log/nginx/observium-access_log combined; | |
error_log /var/log/nginx/observium-error_log warn; | |
root /opt/observium/html; | |
client_max_body_size 10m; | |
client_body_buffer_size 8K; |
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
<cfscript> | |
/** | |
* Displays a formatted approximation of how long ago a timestamp was. | |
* | |
* @param input - Date to Format (required) | |
* @param defaultMask - the date mask if the date is earlier than the earliest case. Default dd MMM, YYYY | |
* @return Returns a string. | |
* @author Ryan Guill ([email protected]), Adam Tuttle ([email protected]) | |
* @version 1, Sept 11, 2014 |
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
<cfset jarsPath = expandPath('/java/barcode4j/') /> | |
<!--- Path where the necessary jar files are located (downloadable from https://www.dropbox.com/s/skl9fwky2n7mnjr/java-files-barcode4j.zip?dl=0) ---> | |
<cfset libraryList = arrayToList( directoryList(jarsPath, false, 'array', '*.jar') ) /> | |
<cfset configBuilder = createObject('java', 'org.apache.avalon.framework.configuration.DefaultConfigurationBuilder', libraryList) /> | |
<cfset barcodeUtil = createObject('java', 'org.krysalis.barcode4j.BarcodeUtil', libraryList) /> | |
<cfset grayImageType = createObject('java', 'java.awt.image.BufferedImage').TYPE_BYTE_GRAY /> | |
<!--- create custom config. See http://barcode4j.sourceforge.net/2.1/symbol-ean-13.html ---> | |
<cfset configXml = '<barcode> |
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
<cfscript> | |
/* 1/4/2016 Identify WebCEO Bot Request (https://www.webceo.com/webceo-bots.htm) | |
Block unwanted page requests from automated Competitor Metrics & Backlink Spy (They don't provide | |
a way for sites to opt-out or use WebCEO-specific robots.txt rules.) | |
*/ | |
function isWebCEO(){ | |
return YesNoFormat(ListFind("97.107.131.214,69.164.220.17,69.164.220.10,69.164.208.136,69.164.208.68,97.107.135.120,97.107.135.14,69.164.212.131,97.107.133.236,97.107.131.160", CGI.Remote_Addr) OR Findnocase("seo-audit-check-bot", CGI.http_User_Agent) OR Findnocase("online-webceo-bot", CGI.http_User_Agent)); | |
} | |
</cfscript> |
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
<cffunction name="limiter"> | |
<!--- | |
by Charlie Arehart, [email protected], in 2009, updated 2012 | |
http://www.carehart.org/blog/client/index.cfm/2010/5/21/throttling_by_ip_address | |
- Throttles requests made more than "count" times within "duration" seconds from single IP. | |
- sends 503 status code for bots to consider as well as text for humans to read | |
- also logs to a new "limiter.log" that is created automatically in cf logs directory, tracking when limits are hit, to help fine tune | |
- note that since it relies on the application scope, you need to place the call to it AFTER a cfapplication tag in application.cfm | |
- updated 10/16/12: now adds a test around the actual throttling code, so that it applies only to requests that present no cookie, so should only impact spiders, bots, and other automated requests. A "legit" user in a regular browser will be given a cookie by CF after their first visit and so would no longer be throttled. | |
- I also tweaked the cflog output to be more like a csv-format output |
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
<!DOCTYPE html> | |
<html lang="en-US"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1" /> | |
<meta name="robots" content="noodp, noydir" /> | |
<link rel="dns-prefetch" href="//cdnjs.cloudflare.com"> | |
<link rel="canonical" href="http://mysite.com/" /> | |
<link rel="stylesheet" href="http://mysite.com/style.css" type="text/css" /> |