Let's make sure our Express app has the required base modules:
# within root of API
npm install --save express pg knex bcrypt
npm install --save-dev nodemon| This Gist contains the GitHub Language colors in CSS and JSON formats in seperate files. |
| /* ProtonMail */ | |
| /* CLASSIC THEME */ | |
| body { font-size: 14px } | |
| body, | |
| .pm_opensans { | |
| font-family: 'Lucida Grande', Verdana, Arial, sans-serif | |
| } |
| export const fetchAsBlob = url => fetch(url) | |
| .then(response => response.blob()); | |
| export const convertBlobToBase64 = blob => new Promise((resolve, reject) => { | |
| const reader = new FileReader; | |
| reader.onerror = reject; | |
| reader.onload = () => { | |
| resolve(reader.result); | |
| }; | |
| reader.readAsDataURL(blob); |
| /* global gapi */ | |
| const API_KEY = 'YOURAPIKEYHERE'; | |
| import React, { Component } from 'react'; | |
| class App extends Component { | |
| loadYoutubeApi() { | |
| const script = document.createElement("script"); |
| /* Required: http://www.fontsquirrel.com/fonts/open-sans */ | |
| @-moz-document domain("youtube.com") | |
| { | |
| :root | |
| { | |
| --bg: #1d1e2a !important; | |
| /* main */ | |
| --bg2: #1a1b26 !important; | |
| /* alt */ | |
| --bg3: #14151F !important; |
| SPC | |
| SPC: find file | |
| , switch buffer | |
| . browse files | |
| : MX | |
| ; EX | |
| < switch buffer | |
| ` eval | |
| u universal arg | |
| x pop up scratch |
| ################## | |
| # sway config file | |
| ################## | |
| set $lock ~/.config/sway/scripts/lock.sh | |
| set $grim ~/.config/sway/scripts/grim.sh | |
| set $slurp ~/.config/sway/scripts/slurp.sh | |
| set $mod Mod4 | |
| set $left h | |
| set $down j | |
| set $up k |
| drawImage = async img_path => { | |
| let canvas = document.createElement("canvas"); | |
| canvas.src = img_path; | |
| const context = canvas.getContext("2d"); | |
| const img = await loadImage(img_path); | |
| canvas.width = img.width; | |
| canvas.height = img.height; | |
| context.drawImage(img, 0, 0); |