Skip to content

Instantly share code, notes, and snippets.

@ccavazos
ccavazos / exportCsvData.js
Last active June 26, 2017 17:39
Titanium Snippet to Export data to CSV
//Common JS module
exports.exportCsvData = function(input)
{
var rowTxt = "";
for(var i=0;i < input.length; i++){ // row iteration
for(var j = 0; j < input[i].length; j++){ // column iteration
rowTxt += '"' + input[i][j] + '"';
if(j < (input[i].length-1)) {
@ccavazos
ccavazos / compareObjects.js
Last active June 26, 2017 17:36
Compare Objects Helper
/**
* Compares 2 Javascript Objects
* @compareObjects
* @param {Object} _old
* @param {Object} _new
* @return {Object} results
*/
exports.compareObjects = function(_old, _new) {
var diff;
@ccavazos
ccavazos / VS_Code_Settings_README.md
Last active March 12, 2019 20:45
VS Code Toolkit for Axway Titanium Development

Snippets

To open up a snippet file for editing, open User Snippets under File > Preferences (Code > Preferences on Mac) and select the language for which the snippets should appear.

Snippets List:

  • tss.json
  • xml.json
  • javascript.json
@ccavazos
ccavazos / IBM Cloud Pak Aliases
Last active September 25, 2020 22:34
Cloud Pak Alias
# System: MacOS
# Shell: Zsh
# Load the Admin Password for Common Services in macOS clipboard
alias cspw='oc get secret -n ibm-common-services platform-auth-idp-credentials -o jsonpath="{.data.admin_password}" | base64 -d | pbcopy | echo "Password copied to clipboard"'
# Get Console URL
alias csurl='oc get route -n ibm-common-services cp-console -o jsonpath='{.spec.host}' && echo ""'
# Load the Licensing Token in macOS clipboard
# Builder
FROM node:14.16.0-alpine as build
WORKDIR /app
ENV PATH /app/node_modules/.bin:$PATH
COPY package.json ./
COPY yarn.lock ./
RUN yarn install --frozen-lockfile
RUN npm install react-scripts@3.4.1 -g
COPY . ./
RUN yarn build