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
// ==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; |
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
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() |
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 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)) |
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 shouter(whatToShout) { | |
return whatToShout.toUpperCase() + '!!!'; | |
} | |
/* From here down, you are not expected to | |
understand.... for now :) | |
Nothing to see here! |