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
<!--- isImageCMYK() v1 (7/6/2013) | |
UDF for ColdFusion 10 by James Moberg | |
Identifies whether a JPEG image uses a CMYK (CUSTOM) palette | |
---> | |
<CFSET ImageFile = expandPath("cmyk.jpg")> | |
<CFSET ImageObject = ImageRead(ImageFile)> | |
<CFOUTPUT> | |
File = #isImageCMYK(Imagefile)#<br> |
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
<!--- | |
Convert CSV file to a ColdFusion query object using opencsv. | |
Requirements: | |
- ColdFusion 8+ ( http://en.wikipedia.org/wiki/Adobe_ColdFusion ) | |
- opencsv - free parser library for Java ( http://opencsv.sourceforge.net/ ) | |
http://opencsv.sourceforge.net/ | |
opencsv supports all the basic csv-type things you're likely to want to do: | |
- Arbitrary numbers of values per line | |
- Ignoring commas in quoted elements | |
- Handling quoted entries with embedded carriage returns (ie entries that span multiple lines) |
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
<CFSETTING ENABLECFOUTPUTONLY="YES"> | |
<!--- | |
Excel.cfm | |
ColdFusion Custom Tag - Converts database query object to | |
XLS/XLSX Excel file w/optional formatting | |
(Based on a defunct CFX_Excel tag that we used with ColdFusion 5) | |
Author: James Moberg james at ssmedia dot com | |
Requirements: ColdFusionF 9+ | |
<CF_Excel query="#GetResults#" filename="Products_#DateFormat(Now(),'yyyymmdd')#.xls"> |
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
REMOVECHAR: | |
AutoTrim,Off | |
StringCaseSense,On | |
StringReplace,string,string,chr(160),A_Space,All ;Non-breaking space | |
StringReplace,string,string,–,-,All ;emdash | |
StringReplace,string,string,´,',All | |
StringReplace,string,string,’,',All | |
StringReplace,string,string,©,(C),All | |
StringReplace,string,string,“,",All ;left quote | |
StringReplace,string,string,”,",All ;right quote |
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
#c:: ;Window+C Convert Columnar Data to SQL-Compatible List | |
StringReplace,clipboard,clipboard,`n,`,,All | |
StringReplace,clipboard,clipboard,`r,,All | |
StringGetPos, pos, clipboard, ID`, ; remove "ID" if first item in the list (Access). | |
if pos = 0 | |
StringRight, clipboard, clipboard, StrLen(clipboard)-3 | |
testString = %clipboard% | |
StringReplace,testString,testString,`,,,All | |
testString := testString * 1 | |
if (testString is integer) { |
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
^!s:: ; CTRL+ALT+S Clean CSS (reduce whitespace + shorten hex color values) | |
WinGetActiveTitle, Title | |
IfInString, Title, HomeSite | |
{ | |
StringReplace,clipboard,clipboard,;`r`n,;%A_Space%,,All | |
StringReplace,clipboard,clipboard,%A_Space%},},,All | |
StringReplace,clipboard,clipboard,{`r`n,{,,All | |
StringReplace,clipboard,clipboard,`r`n{,%A_Space%{,,All | |
StringReplace,clipboard,clipboard,{%A_Space%,{,,All | |
StringReplace,clipboard,clipboard,:%A_Space%,:,,All |
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
SANITIZE: ;sanitize characters (optional, see below) | |
AutoTrim,Off | |
StringCaseSense,On | |
StringReplace,string,string,chr(160),A_Space,All ;Non-breaking space | |
StringReplace,string,string,–,-,All ;emdash | |
StringReplace,string,string,´,',All | |
StringReplace,string,string,’,',All | |
StringReplace,string,string,©,(C),All | |
StringReplace,string,string,“,",All ;left quote | |
StringReplace,string,string,”,",All ;right quote |
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
#IfWinActive ahk_class XLMAIN | |
F3::+F4 | |
#IfWinActive |
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
<p>This sample CFML code is regarding the Adobe ColdFusion bug reported here:<br> | |
<a href="https://bugbase.adobe.com/index.cfm?event=bug&id=3566218">https://bugbase.adobe.com/index.cfm?event=bug&id=3566218</a><br> | |
and can be tested by pasting the code below at <a href="http://cflive.net/">http://cflive.net/</a></p> | |
<p>As of 7/29/2013, Railo is capable of performing a CFHTTP request to a SSL SAN certficate whereas ColdFusion 9.0.2.282541 fails:</p> | |
<blockquote> | |
<p><b>Connection Failure</b><br> | |
I/O Exception: Name in certificate `globalgatewaye4.firstdata.com' does not match host name `api.globalgatewaye4.firstdata.com'</p> | |
</blockquote> |
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
<cfscript> | |
function isTestCC(cc){ | |
var testCCs = "135412345678911, 2211000000000001, 2211000000000019, 2211000000000027, | |
2211000000000035, 2211000000000043, 2211000000000050, 304985028090561515, 30569309025904, | |
3111111111111117, 340000000000009, 340682458348749, 342135898797783, 342337649030528, | |
342650299263839, 342781835011463, 342955624318368, 344058488426266, 345672983453416, | |
345796298727014, 347279493269015, 348771682068975, 3530111333300000, 3566002020140006, | |
3566002020360505, 3566111111111113, 3569990000000009, 36438999960016, 370000000000002, | |
370123456789017, 371449635398431, 375529360131002, 378282246310005, 378734493671000, | |
38520000023237, 4000000000000002, 4000000000000010, 4000000000000028, 4000000000000036, |
OlderNewer