Skip to content

Instantly share code, notes, and snippets.

View renatosousafilho's full-sized avatar

Renato Filho renatosousafilho

View GitHub Profile
@renatosousafilho
renatosousafilho / javascript.json
Created June 2, 2021 22:31
Snippets para Node + Express
{
// Place your snippets for javascript here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
// same ids are connected.
// Example:
"hello-world": {
"prefix": "helloworld",
"body": [
"console.log('hello world');",
@renatosousafilho
renatosousafilho / Post.js
Created November 18, 2020 22:10
Sql Join com XDEVAPI
const getPostWithCommentsById = async (postId) => {
const session = await connection();
const result = await session.sql(
`SELECT c.title as title_comment, p.title as title_post
FROM comments AS c
INNER JOIN posts AS p ON p.id = c.post_id
WHERE p.id=?,
)
.bind(postId)
.bind(postId)
@renatosousafilho
renatosousafilho / index.html
Created July 23, 2020 22:20
Plantão Extra - Event Listeners
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<div id="resposta"></div>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=">
<title></title>
</head>
<body>
<h1>Hello World</h1>
</body>
[
{
color: "red",
value: "#f00"
},
{
color: "green",
value: "#0f0"
},
{
body {
size: 330mm 427mm;
margin: 14mm;
}
.col-sm-12, .row {
width: 300px;
}
@renatosousafilho
renatosousafilho / client_amqp.rb
Created July 7, 2017 18:08
client amqp for betradar
require 'bunny'
STDOUT.sync = true
conn = Bunny.new(
host: 'mq.betradar.com',
vhost: '/unifiedfeed/XXXXX',
port: 5671,
user: 'XXXXXXXXXXXXXXXXX',
password: "",
@renatosousafilho
renatosousafilho / AgendamentoShows.md
Last active April 28, 2017 15:41
Agenda de Shows 2017