Skip to content

Instantly share code, notes, and snippets.

View levonlee's full-sized avatar
🎯
Focusing

misterlcanada levonlee

🎯
Focusing
View GitHub Profile
@levonlee
levonlee / Various Ways of using AngularJS Transclude.md
Last active October 27, 2015 16:56
Various Ways of using AngularJS Transclude

The following shows different usage of Transclude in AngularJS

  • Add static element on top of existing ones
  • Add dynamic element on top of existing ones
  • Wrap existing elements with a dynamic element which is added later
  • Change the current element's attribute or class

jsFiddle

@levonlee
levonlee / new_gist_file.vbs
Created October 7, 2015 21:19
Export queries to Excel in Access using VBA
Option Compare Database
Option Explicit
Sub ExportToXlsx()
Dim cdb As DAO.Database, qdf As DAO.QueryDef
Set cdb = CurrentDb
Dim xlsxPath As String
xlsxPath = "C:\GP_NBM_2012.xlsx"
Set qdf = cdb.CreateQueryDef("01", _
@levonlee
levonlee / 0_reuse_code.js
Created October 7, 2015 21:14
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console

Output query to json format.

Convert a struct to JSON using this JSONUtil.cfc

@levonlee
levonlee / Different-places-to-define-Filter-in-AngularJS.markdown
Last active October 7, 2015 21:11
Different places to define Filter in AngularJS

Filter defined in controller Filter called by filter:customFilter in ngRepeat Filter called by customFilter:var1:var2 in ngRepeat Filter defined in a module holding common features Filter instatiated in another module using $filter Filter injected into another module and called by customFilter:var1:var2 in ngRepeat

http://jsfiddle.net/gh/gist/library/pure/2119ee633d635a99e88a/

@levonlee
levonlee / output-json.cfm
Created July 30, 2015 16:23
Convert ColdFusion Variable to JSON and Output
<!--- Convert a ColdFusion variable to JSON format --->
<cfset s = "I'm a string or URL.">
<cfset numInteger = 1994>
<cfset JSONUtil = createObject("component","functions.JSONUtil")>
<cfoutput>#JSONUtil.serializeJSON(s)#</cfoutput>
<cfoutput>#JSONUtil.serializeJSON(numInteger,0,1)#</cfoutput>
<!--- Read json --->
<cfset strJson = ' {"strerror":"","strsuccess":"Thank you for your message!"}'>