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
| # 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 [email protected] -g | |
| COPY . ./ | |
| RUN yarn build |
| # 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 |
| /** | |
| * Compares 2 Javascript Objects | |
| * @compareObjects | |
| * @param {Object} _old | |
| * @param {Object} _new | |
| * @return {Object} results | |
| */ | |
| exports.compareObjects = function(_old, _new) { | |
| var diff; |
| //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)) { |