This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const isArray = item => { | |
| return Array.isArray(item); | |
| }; | |
| export const isBoolean = value => { | |
| return typeof value === 'boolean'; | |
| }; | |
| const isObject = item => { | |
| return item === Object(item) && !isArray(item) && typeof item !== 'function'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| "Print to console": { | |
| "scope": "javascript,typescript,javascriptreact,typescriptreact", | |
| "prefix": "clg", | |
| "body": [ | |
| "console.log('$1', $1);", | |
| "$2" | |
| ], | |
| "description": "Log output to console" | |
| }, | |
| "create const function": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Available variables: | |
| // - Machine | |
| // - interpret | |
| // - assign | |
| // - send | |
| // - sendParent | |
| // - spawn | |
| // - raise | |
| // - actions |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Check for merge conflicts | |
| # Tested on Linux and Mac | |
| # Simple check for merge conflics | |
| conflicts=`git diff --cached --name-only -G"<<<<<|=====|>>>>>"` | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| git branch -m old_branch new_branch # Rename branch locally | |
| git push origin :old_branch # Delete the old branch | |
| git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const express = require('express'); | |
| const cors = require('cors'); | |
| const app = express(); | |
| const oracledb = require('oracledb'); | |
| const dbConfig = require('./dbconfig.js'); | |
| app.use(cors()); | |
| app.listen(4000, () => { |