Skip to content

Instantly share code, notes, and snippets.

View ivanionut's full-sized avatar
🎯
Focusing

Ivan Ionut ivanionut

🎯
Focusing
View GitHub Profile
.hide-text {
text-indent: 100%;
white-space: nowrap;
overflow: hidden;
}
/* Scott Kellum Technique - Reference: http://www.zeldman.com/2012/03/01/replacing-the-9999px-hack-new-image-replacement/ */
Use this for SEO/Accessability Friendly
@ivanionut
ivanionut / ExifTool.cfc
Last active September 18, 2015 15:02 — forked from JamoCA/ExifTool.cfc
ColdFusion ExifTool.CFC update to enable gathering all metadata in a single call w/option to save result as JSON file.
<!---
@name: ExifTool.cfc
@originalauthor: Steven Erat
@originaldate: March 2011
@version: 1.0
@contact: talkingtree@gmail.com, http://www.talkingtree.com/
@Forked: 9/17/2015 by James Moberg; http://SunStarMedia.com https://about.me/jamesmoberg
http://gamesover2600.tumblr.com/post/129293628174/exiftoolcfc-update
New getInfo() function to get a struct of all meta data.
Added logJSON option to save ExifTool JSON output to same filepath.
@ivanionut
ivanionut / getMimeType.cfm
Last active September 15, 2015 16:40 — forked from JamoCA/getMimeType.cfm
Update to ColdFusion getMimeType UDF. Update struct creation & add/update mime types. Make filename optional. Passes "application/unknown" if type not found.
/* ORIGINAL: http://www.cflib.org/udf/getMimeType
Returns mime type and subtype for a file.
@param filename File name to examine. (optional)
@return Returns a string.
@author Kenneth Rainey (kip.rainey@incapital.com)
@version 1, April 21, 2004
@version 2, September 1, 2015 https://gist.github.com/JamoCA/5a2cece7e2a248f71ad9 */
function getMimeType() {
var fileExtension = "";
var mimeStruct = {"323" = "text/h323",
@ivanionut
ivanionut / S3Wrapper.cfc
Last active September 13, 2015 08:38 — forked from christierney402/S3Wrapper.cfc
Amazon Web Services (AWS) S3 Wrapper for ColdFusion
/**
* Amazon S3 REST Wrapper
* Version Date: 2015-09-03
*
* Copyright 2015 CF Webtools | cfwebtools.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
@ivanionut
ivanionut / PDF_Merge.cfm
Last active August 31, 2015 13:11 — forked from JamoCA/PDF_Merge.cfm
Using ColdFusion & iText to merge PDFs with editable forms
<cfscript>
/* Using ColdFusion and iText to merge PDFs with editable forms.
Adobe apparently doesn't allow this due to licensing reasons.
If merged using solely CFPDF, only the last merged PDF document will have editable fields.
NOTE: Any merged editeable fields with duplicate fieldnames will result in being bound together when edited.
CREDIT ~2007: http://cfsearching.blogspot.com/2007/12/getting-started-with-itext-part-18.html
*/
inFiles = ["c:\file1.pdf", "c:\file2.pdf", "c:\file3.pdf", "c:\file4.pdf"];
outFile = "c:\merged.pdf";
<!--- on initial request, run query --->
<cfset "session.#attributes.myactionfile#" = "" />
<cfsavecontent variable="datasorter_js">
<style type="text/css" title="currentStyle">
@import "css/datatables_table.css";
</style>
<script type="text/javascript" language="javascript" src="js/jquery.dataTables.min.js"></script>
<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
<!--- place in /controllers folder--->
<cfcomponent extends="Controller">
<cffunction name="getdemo" returntype="Query" access="private" >
<cfset var entries = model("entry").findAll(select="BODY,CATEGORYID,TITLE,dateCreated") />
<cfreturn entries />
</cffunction>
<cffunction name="init">
<cfset filters(through="turnOffDebugging",only="processing")>
<cfscript>
// Create an instance of the mail object
mail=new mail();
// Set it's properties
mail.setSubject( "Sample Email" );
mail.setTo( "to@example.com" );
mail.setFrom( "from@example.com" );
mail.setCC( "cc@example.com" );
mail.setBCC( "bcc@example.com" );
CREATE TABLE `comuni` (
`id` smallint(4) NOT NULL,
`comune` varchar(48) NOT NULL DEFAULT '',
`prefisso` char(4) NOT NULL DEFAULT '',
`cap` char(5) NOT NULL DEFAULT '',
`codice_istat` char(6) NOT NULL DEFAULT '',
`codice_catasto` char(4) NOT NULL DEFAULT '',
`id_provincia` tinyint(3) NOT NULL,
`sigla` char(2) NOT NULL DEFAULT '',
`provincia` varchar(48) NOT NULL DEFAULT '',