Skip to content

Instantly share code, notes, and snippets.

View joeljuca's full-sized avatar
👨‍💻
Working on smt new

Joel Jucá joeljuca

👨‍💻
Working on smt new
View GitHub Profile
// ==UserScript==
// @name MDN always in en-US
// @version 1
// @grant none
// @match https://developer.mozilla.org/*
// @run-at document-start
// ==/UserScript==
(function () {
const url = document && document.location && document.location.host;
@joeljuca
joeljuca / twitter_client.ex
Last active May 23, 2020 02:29 — forked from allefgomes/twitter_client.ex
Twitter Client in elixir
defmodule TwitterClient do
use Tesla
@token System.get_env("TWITTER_TOKEN")
plug(Tesla.Middleware.BaseUrl, "https://api.twitter.com")
plug(Tesla.Middleware.DecodeJson)
def get_tweets do
{:ok, response} = make_request()
@joeljuca
joeljuca / app.js
Last active December 25, 2018 14:19 — forked from JohnnyHandy/app.js
PASSPORT & express-session config e models
const passport = require("passport");
const { LocalStrategy } = require("passport-local");
const User = require("./models/user");
const Employee = require("./models/employee");
const session = require('express-session');
passport.use(new LocalStrategy(username, password, done) => {
User.findOne({ username })
.then(user => done(null, user && User.isPasswordValid(user, password) ? user : false))
.then(err => done(err))
@joeljuca
joeljuca / shouter.js
Last active April 10, 2017 15:07 — forked from michaelablackham/shouter
String Drills
function shouter(whatToShout) {
return whatToShout.toUpperCase() + '!!!';
}
/* From here down, you are not expected to
understand.... for now :)
Nothing to see here!