Skip to content

Instantly share code, notes, and snippets.

View arthurbernierjr's full-sized avatar
🎯
Focusing

Arthur Bernier arthurbernierjr

🎯
Focusing
View GitHub Profile
const { Configuration, OpenAIApi } = require("openai");
const User = require("../models/UserModel");
const BulkDescriptions = require("../models/BulkDescriptionModel");
const SingleDescriptions = require("../models/SingleDescriptionModel");
const uniqid = require("uniqid");
const configuration = new Configuration({
apiKey: process.env.OPENAI_API_KEY,
});
## isBlockedBy
###
{
username: 'this is the user we want to know is blocked',
blocker: 'the user we want to know is blocked'
token
}
###
userRouter.post '/isBlockedBy', jsonAuth, (req, res) ->
userQuery = User.findOne({ username: req.body.blocker }).select("_id blocked").populate("blocked")
@arthurbernierjr
arthurbernierjr / 1-promises.coffee
Created December 24, 2019 17:54 — forked from pketh/1-promises.coffee
Promises in Coffeescript
# Create a promise:
myCoolPromise = new Promise (resolve, reject) ->
# do a thing
success = true
if success
resolve 'stuff worked'
else
reject Error 'it broke'
@arthurbernierjr
arthurbernierjr / 1-promises.coffee
Created December 24, 2019 17:54 — forked from pketh/1-promises.coffee
Promises in Coffeescript
# Create a promise:
myCoolPromise = new Promise (resolve, reject) ->
# do a thing
success = true
if success
resolve 'stuff worked'
else
reject Error 'it broke'

SHORTCUTS

Key/Command Description
Tab Auto-complete files and folder names
Ctrl + A Go to the beginning of the line you are currently typing on
Ctrl + E Go to the end of the line you are currently typing on
Ctrl + U Clear the line before the cursor
Ctrl + K Clear the line after the cursor
Ctrl + W Delete the word before the cursor
Ctrl + T Swap the last two characters before the cursor
@arthurbernierjr
arthurbernierjr / contractor_must_know.md
Last active March 23, 2019 19:00
Contract Full Stack Javascript Things You Need to Know

Contract Full Stack Javascript Things You Need to Know

Developer Essentials

		**HTML5(MUST) & CSS3(MUST)**
		**Vanilla JavaScript(MUST)**
		**JQuery and Lodash**
		**Bootstrap, Bulma and MaterializeCSS**
		**Markdown**

Git(MUST) & GitHub(MUST)

@arthurbernierjr
arthurbernierjr / bootstrap-wide.css
Created July 28, 2018 07:54 — forked from tiborp/bootstrap-wide.css
Extra media queries for BIG screens
// Extra big for Twitter Bootstrap
@media screen and (min-width: 1400px) {
.container {
width: 1370px;
}
}
@media screen and (min-width: 1600px) {
.container {
width: 1570px;
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<h1>Hey There!</h1>
<p>This is our interactive code editor</p>