Skip to content

Instantly share code, notes, and snippets.

💭
Working on Chromebook

Ezequiel Jose Lopez cocolote

💭
Working on Chromebook
Block or report user

Report or block cocolote

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@cocolote
cocolote / debug-phone-web-app.md
Created May 21, 2017
steps to debug a web phone app
View debug-phone-web-app.md

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 / linux_cheetsheet.sh
Last active Oct 24, 2019
Linux command line cheatsheet
View linux_cheetsheet.sh
# 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 / VIM-cheatsheet.md
Last active Aug 29, 2015
A reference with the basic commands for VIM
View VIM-cheatsheet.md

#Vim Basic Commands

###Modes i: change to insert mode to edit text v: change to visual mode to select text Esc: Normal mode to navigate through the text file

###Moves (Normal mode) h: move left | l: move right j: move up | k: move down

@cocolote
cocolote / JSON-CFML.md
Created Jul 15, 2015
JavaScript Object Notation JSON and ColdFusion
View JSON-CFML.md

#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 / CF-XML.md
Last active Aug 29, 2015
XML and CFML
View CF-XML.md

#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 / CF-Queries.md
Last active Apr 6, 2018
Cold Fusion Queries Cheat sheet
View CF-Queries.md

#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
@cocolote
cocolote / apache-installation.md
Last active Aug 29, 2015
Apache Installation
View apache-installation.md

#Install Apache server on Windows 7 64 with IIS running

Check first if you have the dependencies installed in your computer. You need Visual C++ 2008 Redistributable Package Open the control panel (window+r type "control" and press "enter") check if you see the package installed.

Get the Apache .zip. This is and official third party site, Apache does not provide a package to install in windows, you would have to build it manually.

Unzip the file and move or copy its content into C:\Apache22

To start Apache open a command prompt (windows+r type "cmd" press "enter"). Navigate to *C:\Apache22\bin* and type httpd.exe then enter

@cocolote
cocolote / win-network-commands.md
Last active Aug 29, 2015
Some windows network commands
View win-network-commands.md

#Windos Network Commands

###nslookup The nslookup tool can help you to verify that DNS name resolution is working correctly. When you run nslookup against a host name, the tool will show you how the name was resolved, as well as which DNS server was used during the lookup. This tool can be extremely helpful when troubleshooting problems related to legacy DNS records that still exist but that are no longer correct. To use this tool, just enter the nslookup command, followed by the name of the host you want to resolve. For example:

nslookup tsdata.ts24

###netstat -an The netstat command is particularly useful, displaying all sorts of network statistics when used with its various options. One of the most interesting variants of netstat is netstat -an, which will display a list of all open network connections on their computer, along with the port they’re using and the foreign IP address they’re connected to.

View loop-CF.md

Loops

  • The old for loop

cfloop have step attribute that you can use it to: increment in a different pase or decrement using negative numbers step = "-1" this would decrement 1 by one

<cfloop from="1" to="5" index="i">
@cocolote
cocolote / Params-Forms-CFML.md
Last active Aug 29, 2015
The params array of CFML
View Params-Forms-CFML.md

Setting variables and sending values with forms CFML

  1. Set the variables to use with the form under line
<cfparam name = "form.contactname" default = "" />
<cfparam name = "form.email" default = "" />
<cfparam name = "form.message" default = "" />
<cfparam name = "form.submitted" default = "0" />
You can’t perform that action at this time.