git config --global user.name calvimor
git config --global user.email [email protected]
git config --global core.editor vim|atom
git config --global core.autocrlf true|false|input
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
function myFunc() { | |
var x = 0; | |
for (var i = 0; i < arguments.length; i++) { | |
x = x + arguments[i]; | |
} | |
return x; | |
} |
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
// Code goes here | |
var Calc = function (start) { | |
var that = this; | |
this.add = function(x) { | |
start = start + x; | |
return that; | |
}; | |
this.multiply = function (x) { |
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
var Book = function (name, price) { | |
var priceChanging = [], | |
priceChanged = []; | |
this.name = function (val) { | |
return name; | |
}; | |
this.price = function (val) { | |
if(val !== undefined && val !== price) { | |
for (var i = 0; i < priceChanging.length; i++) { |
First of all you have to initialize the repository with git init
. You can run this command on an empty directory or not.
Once you have initialized the repo, there is a workflow in git that you should do every time you make changes like add/delete/update files.
git status
git add -A
git commit -m "a little description"
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
<html> | |
<head> | |
<title>API Example</title> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> | |
<script type="text/javascript"> | |
var accessToken = "<your agent's client access token>"; | |
var baseUrl = "https://api.api.ai/v1/"; | |
$(document).ready(function() { | |
$("#input").keypress(function(event) { |
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
{ | |
"name": "js-dev-environment", | |
"version": "1.0.0", | |
"description": "JavaScript development environment", | |
"scripts": { | |
}, | |
"author": "Carlos Villamizar", | |
"license": "MIT", | |
"dependencies": { | |
"whatwg-fetch": "1.0.0" |
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
import path from 'path'; | |
export default { | |
debug: true, | |
devtool: 'inline-source-map', | |
noInfo: false, | |
entry: [ | |
path.resolve(__dirname, 'src/index') | |
], | |
target: 'web', |
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
Show hidden characters
{ | |
"root": true, | |
"extends": [ | |
"eslint:recommended", | |
"plugin:import/errors", | |
"plugin:import/warnings" | |
], | |
"parserOptions": { | |
"ecmaVersion": 7, | |
"sourceType": "module" |
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
export const schema = { | |
"type": "object", | |
"properties": { | |
"users": { | |
"type": "array", | |
"minItems": 3, | |
"maxItems": 5, | |
"items": { | |
"type": "object", | |
"properties": { |