Skip to content

Instantly share code, notes, and snippets.

View wallacyyy's full-sized avatar

Leonardo Couto wallacyyy

View GitHub Profile
@wallacyyy
wallacyyy / resume.json
Last active April 13, 2021 15:15
JSON resume
{
"basics": {
"name": "John Doe",
"label": "Programmer",
"picture": "",
"email": "john@gmail.com",
"phone": "(912) 555-4321",
"website": "http://johndoe.com",
"summary": "A summary of John Doe...",
"location": {
@wallacyyy
wallacyyy / server.js
Created July 13, 2016 02:02
2016-07-11
const express = require('express')
const path = require('path')
const app = express()
const rsvp = require('./rsvp')
app.set('view engine', 'html')
app.use('/', express.static(path.resolve(__dirname, 'public')))
app.get('/', function (req, res) {
res.sendFile(path.resolve(__dirname, 'index.html'))
@wallacyyy
wallacyyy / mailer.js
Last active July 14, 2016 17:46
Mailer
const RSVP = require('./rsvp')
const sendgrid = require('sendgrid')(process.env.SENDGRID_API_KEY)
const htmlContent = function (url) {
return "<html>" +
"<head>" +
"<meta name='viewport' content='width=device-width, initial-scale=1'>" +
"</head>" +
"<body>" +
"Click <a href='" + url + "'>here</a> to confirm your presence :)" +
@wallacyyy
wallacyyy / migrate.js
Last active July 13, 2016 02:58
2016-07-11
const RSVP = require('./rsvp')
const ID = function () {
return Math.random().toString(36).substr(2, 9)
}
const invites = [
{
email: 'name@gmail.com',
name: 'Name',
@wallacyyy
wallacyyy / rsvp.js
Last active July 13, 2016 02:59
2016-07-11
const Invite = require('./invite')
module.exports = {
pending: function () {
return Invite.findAll({
where: {
confirmed: false
}
})
},
@wallacyyy
wallacyyy / connection.js
Last active July 13, 2016 00:46
2016-07-11
const Sequelize = require('sequelize')
const connection = null
module.exports = {
connect: function () {
if (connection) return connection
return new Sequelize(process.env.DATABASE_NAME,
process.env.DATABASE_USER,
process.env.DATABASE_PASSWORD, {
@wallacyyy
wallacyyy / invite.js
Last active July 12, 2016 23:54
2016-07-11
const Sequelize = require('sequelize')
const sequelize = require('./connection').connect()
const Invite = sequelize.define('invite', {
url: Sequelize.STRING,
name: Sequelize.STRING,
confirmed: Sequelize.BOOLEAN,
email: Sequelize.STRING
})
@wallacyyy
wallacyyy / Nvidia Installation
Last active December 17, 2015 18:29
Installing nvidia drivers on ubuntu 12.04.2 LTS
Hit Ctrl + Alt + F1
sudo apt-get update
sudo apt-get install linux-headers-generic
sudo apt-get dist-upgrade
--------------------
If your linux was not installed from a cd, but instead from a stick, do this: