Find in a single file:
grep -E -o "\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,6}\b" someFile.txt
/** | |
* @author Adrian J. Moreno | |
* @website http://iknowkungfoo.com | |
* @Twitter: @iknowkungfoo | |
* @hint: A custom JSON render object for ColdFusion queries. | |
* @Repo: https://github.com/iknowkungfoo/cfquery-to-json | |
* @version 4.0 | |
* @requirements ColdFusion 9.0+ or Railo 4+ | |
* @BlogPost: http://cfml.us/Ce | |
*/ |
<cfquery name="blog" datasource="iknowkungfoo"> | |
SELECT | |
cte.post_id | |
, cte.post_title | |
, cte.post_body | |
, cte.post_more | |
, cte.post_date | |
, cte.post_time | |
, cte.post_alias | |
, group_concat(LCASE(cte.post_category) order by cte.post_category separator ' ') as post_categories |
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.
/**
* Convert n query object to an array of structs.
* @param required query data Query Object
* @return array
*/
{ | |
"name":"Test", | |
"debug":true, | |
"console":true, | |
"web":{ | |
"host":"test.localhost", | |
"webroot":"wwwroot", | |
"directoryBrowsing":false, | |
"welcomeFiles":"index.cfm", | |
"http":{ |
<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 = { |
{ | |
"bootstrapped": true, | |
"in_process_packages": | |
[ | |
], | |
"installed_packages": | |
[ | |
"AdvancedNewFile", | |
"BracketHighlighter", | |
"CFML", |
{ | |
"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 |
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 |