Skip to content

Instantly share code, notes, and snippets.

View cocolote's full-sized avatar
💭
Working on Chromebook

Ezequiel Jose Lopez cocolote

💭
Working on Chromebook
View GitHub Profile
@cocolote
cocolote / JSON-CFML.md
Created July 15, 2015 14:31
JavaScript Object Notation JSON and ColdFusion

#JavaScript Object Notation (JSON) and CFML

###Creating JSON object

As you probably guessed JSON objects can be created from cf structures

<cfset myStruct = {
	items: {
		item1: {name: 'item1', price: 1000},
 item2: {name: 'item2', price: 12.50},
@cocolote
cocolote / debug-phone-web-app.md
Created May 21, 2017 16:32
steps to debug a web phone app

Debug Javascript mobile web app (linux)

  1. Plug your phoen with the USB cable to your computer
  2. Run usbmuxd with sudo

$ sudo usbmuxd

  1. Run idevice_id -l to check if the phone is reachable

$ idevice_id -l

@cocolote
cocolote / CF-XML.md
Last active December 14, 2020 16:25
XML and CFML

#Working with XML in ColdFusion

Cheatsheet with code examples to read, create and search xml files

ColdFusion provides many built-in functions for doing all sort of XML based operations.

###Reading XML Document Read the document then passes it to the parser to create an XML object

<cffile action="read" file="#ExpandPath('./some.xml')#" variable="myXML" />
<cfset myDoc=XmlParse(myXML) />
@cocolote
cocolote / linux_cheetsheet.sh
Last active December 24, 2021 05:07
Linux command line cheatsheet
# SED = TEST SQL QUERIES SYNTAX
# =============================
# Takes the table name and the WHERE clause to create a SELECT query with this values.
## UPDATE queries
sed 's|update\s\+\([A-Z0-9_]\+\).\+\(where\s\+.\+$\)|SELECT * FROM \1 \2|i' <text file with queries>
### example: UPDATE table_2 SET filed_1 = '123ab', field_2 = 123 WHERE field_3 = 'bla' and field_5 like '%lala'
### output example: SELECT * FROM table_2 WHERE field_3 = 'bla' and field_5 like '%lala'
## DELETE queries
@cocolote
cocolote / coldfusion_cheatsheet.md
Last active May 3, 2023 10:24
ColdFusion cheatsheet

The ColdFusion Basics

Set variables

  • Current time
<cfset currentTime = now() />
  • Regular string
@cocolote
cocolote / CF-Queries.md
Last active April 4, 2024 15:54
Cold Fusion Queries Cheat sheet

#ColdFusion Queries

To interact with a database with CFML first you need to setup the data source in the administrator site.

The table that I'm usign in this examples

####----TestTable-----

id myDataAlfa myDataInt