Skip to content

Instantly share code, notes, and snippets.

View iknowkungfoo's full-sized avatar

Adrian J. Moreno iknowkungfoo

View GitHub Profile
@iknowkungfoo
iknowkungfoo / ChildTag.cfc
Last active August 29, 2015 13:56
A parent CFC uses implicit getters and setters with the property "data". A child CFC extends the parent with a defined setter for "data", which calls super.setData(). setData() is not found.
<!--- Child CFC, extends Parent --->
<cfcomponent displayName="ChildTag" output="false" accessors="true" extends="ParentTag">
<cfproperty name="wibble" type="string" required="true" />
<cffunction name="setData" output="false" returntype="void">
<cfargument name="data" type="string" required="true" />
<cfset super.setData(arguments.data & " via Child.") />
</cffunction>
@iknowkungfoo
iknowkungfoo / ColdFusion 11 on OSX
Last active July 23, 2016 04:29
Start and stop ColdFusion server on OSX.
function finish {
/Applications/ColdFusion11/cfusion/bin/coldfusion stop
}
trap finish 2
/Applications/ColdFusion11/cfusion/bin/coldfusion start
tail -f /Applications/ColdFusion11/cfusion/logs/coldfusion-out.log
@iknowkungfoo
iknowkungfoo / revealing_module_template.js
Last active July 20, 2021 17:52
JavaScript Revealing Module Template with jQuery setup
NameSpace.moduleName = function($) {
// Private variable, global to the module.
var _foo;
// Private variable, global to the module.
// Will represent a jQuery object.
var $_bar;
// Constructor
var init = function() {
function finish {
/Applications/ColdFusion2016/cfusion/bin/coldfusion stop
}
trap finish 2
/Applications/ColdFusion2016/cfusion/bin/coldfusion start
tail -f /Applications/ColdFusion2016/cfusion/logs/coldfusion-out.log
@iknowkungfoo
iknowkungfoo / gist:bb4005543f0293aa308e8c94acba5a98
Last active January 26, 2017 07:17
Sublime Text 3 User Config
{
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme",
"font_face": "Hack",
"font_size": 14,
"highlight_modified_tabs": true,
"ignored_packages":
[
"Vintage"
],
"trim_trailing_white_space_on_save": true
@iknowkungfoo
iknowkungfoo / gist:083c712a471715864f7e4869ab1af004
Last active August 2, 2017 16:33
Sublime Text 3 Installed Packages
{
"bootstrapped": true,
"in_process_packages":
[
],
"installed_packages":
[
"AdvancedNewFile",
"BracketHighlighter",
"CFML",
<cfcomponent output="false" displayname="Spreadsheet Service">
<cffunction name="init" access="public" output="false" returntype="SpreadsheetService">
<cfreturn this />
</cffunction>
<cffunction name="createFromQuery" access="public" output="false" returntype="void">
<cfargument name="data" type="query" required="true" />
<cfargument name="xlsx" type="boolean" required="false" default="false" hint="File extension is xlsx (true) or xls (false)." />
<cfargument name="fileName" type="string" required="false" default="" hint="Final file name sent to the browser." />
<cfset var config = {
@iknowkungfoo
iknowkungfoo / server.json
Last active May 3, 2018 16:22
CommandBox config for ColdFusion 9 on macOS
{
"name":"Test",
"debug":true,
"console":true,
"web":{
"host":"test.localhost",
"webroot":"wwwroot",
"directoryBrowsing":false,
"welcomeFiles":"index.cfm",
"http":{
@iknowkungfoo
iknowkungfoo / git_quickstart.md
Last active May 26, 2022 17:02
A collection of common git commands.

Git Quick Start

Configure SSH

Create a new SSH key: ssh-keygen -t rsa

Accept default location, enter a password.

Enter file in which to save the key (/c/Users/user.name/.ssh/id_rsa):
@iknowkungfoo
iknowkungfoo / coldfusion_array_of_structs.md
Last active January 4, 2018 05:33
Evolution of creating an array of structs from a ColdFusion query.

While updating my cfquery-to-json repoistory to use the latest ColdFusiuon 2016 functions, I was amazed at how much less code it takes to return the same data structures.

ColdFusion 9+

/**
* Convert n query object to an array of structs.
* @param required query data Query Object
* @return array
*/