This file contains 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'), | |
bodyParser = require('body-parser'); | |
app = express(); | |
const todoRoutes = require('./routes/todos'); | |
// body parser conf | |
app.use(bodyParser.json()); | |
app.use(bodyParser.urlencoded({extended: true})); |
This file contains 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
{ | |
"editor.tabSize": 2, | |
"editor.scrollbar.verticalScrollbarSize": 1, | |
"explorer.scrollbar.verticalScrollbarSize": 1, | |
"editor.scrollbar.horizontalScrollbarSize": 1, | |
"editor.overviewRulerBorder": false, | |
"editor.snippetSuggestions": "top", | |
"prettier.eslintIntegration": true, | |
"workbench.welcome.enable": false, | |
"prettier.singleQuote": true, |
This file contains 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
{ | |
"plugins": [ | |
"react" | |
], | |
"extends": "airbnb", | |
"env": { | |
"browser": true, | |
"node": true, | |
"es6": true, | |
"commonjs": true |
This file contains 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 app = express(); | |
app.get('/', (req, res) { | |
res.send('Hello world!'); | |
}); | |
app.listen(3000, () => { | |
console.log('Magic happens on port 3000') | |
}) |
This file contains 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
# If you come from bash you might have to change your $PATH. | |
# export PATH=$HOME/bin:/usr/local/bin:$PATH | |
# Path to your oh-my-zsh installation. | |
export ZSH=/Users/lupuselit/.oh-my-zsh | |
export PATH=${PATH}:/usr/local/mysql/bin | |
# Set name of the theme to load. Optionally, if you set this to "random" | |
# it'll load a random theme each time that oh-my-zsh is loaded. | |
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes |
This file contains 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
#include <stdio.h> | |
int main(void) | |
{ | |
printf("hello world!"); | |
return 0; | |
} | |
// compiler file_name -o created_file_name |
This file contains 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 change_machine(cents) { | |
// quarters (25 cents) | |
// dimes (10 cents) | |
// nickels (05 cents) | |
// pennies (01 cent) | |
// you shall remove the ifs, they are totally unnecessary | |
let quarters = 0, dimes = 0, nickels = 0, pennies = 0; | |
if(cents >= 25) { |
This file contains 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
#include <stdio.h> | |
#include <string.h> | |
// Definindo um struct para cartas de um baralho | |
struct carta { | |
char nome[101]; | |
char valor[101]; | |
int poder; | |
}; | |
typedef struct carta carta;; |
This file contains 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
CREATE ROLE uni WITH LOGIN PASSWORD 'password'; | |
psql -d postgres -U uni | |
\c uni_ru; | |
\dt mostra tds | |
brew services start postgresql | |
brew services stop postgresql |
This file contains 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
// { | |
// "eslint.codeActionsOnSave": true, | |
// "eslint.validade": [ | |
// "javascript", | |
// "javascriptreact", | |
// {"language": "typescript", "autoFix": true}, | |
// {"language": "typescriptreact", "autoFix": true} | |
// ] | |
// } |
OlderNewer