Skip to content

Instantly share code, notes, and snippets.

View emersxw's full-sized avatar
😎
oh, hey!

Emerson Lopes emersxw

😎
oh, hey!
View GitHub Profile
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}));
@emersxw
emersxw / .vscode
Last active October 5, 2018 13:03
vsCode Config
{
"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,
@emersxw
emersxw / .eslintrc
Created April 14, 2018 11:44
ESLint config
{
"plugins": [
"react"
],
"extends": "airbnb",
"env": {
"browser": true,
"node": true,
"es6": true,
"commonjs": true
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')
})
# 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
#include <stdio.h>
int main(void)
{
printf("hello world!");
return 0;
}
// compiler file_name -o created_file_name
@emersxw
emersxw / cents.js
Created March 2, 2019 01:14
cents into
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) {
@emersxw
emersxw / struct.c
Created May 15, 2019 20:59
A simple struct with char in c
#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;;
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
// {
// "eslint.codeActionsOnSave": true,
// "eslint.validade": [
// "javascript",
// "javascriptreact",
// {"language": "typescript", "autoFix": true},
// {"language": "typescriptreact", "autoFix": true}
// ]
// }