Skip to content

Instantly share code, notes, and snippets.

View chewtoys's full-sized avatar
💙
<3

CHEWTOYS chewtoys

💙
<3
View GitHub Profile
@chewtoys
chewtoys / synthwaveglow.md
Created January 5, 2020 17:47 — forked from sbinlondon/synthwaveglow.md
Get the synth wave glow theme working for VS Code on Mac

Get the synth wave glow working for VS Code on Mac

These notes are pretty much the same steps as the two extensions list, it's just that I had to collate them together because neither seems to list it fully in the proper order.

  1. Install Synthwave ’84/Synthwave + Fluoromachine theme on VS Code (I used the Fluoromachine one)

  2. Install Custom CSS and JS Loader

  3. Command + Shift + P to open command palette > "Preferences: Open settings (JSON)"

// ###############################
import Sequelize from 'sequelize';
import User from '../models/User';
import Test from '../models/Test';
import databaseConfig from '../database';
const {
omit,
} = require('lodash')
transform() {
const transformed = {}
const fields = ['id', 'name', 'stats']
fields.forEach((field) => {
transformed[field] = this[field]
@chewtoys
chewtoys / docker-compose.yml
Created October 31, 2019 22:56 — forked from tingwei628/docker-compose.yml
use postgresql and pgAdmin in docker
version: "3.4"
services:
pgAdmin:
restart: always
image: dpage/pgadmin4
ports:
- "8000:80"
environment:
PGADMIN_DEFAULT_EMAIL: [email protected]
@chewtoys
chewtoys / makefile
Created October 23, 2019 03:32
makefile
.POSIX:
DESTDIR=public
HUGO_VERSION=0.58.3
OPTIMIZE = find $(DESTDIR) -not -path "*/static/*" \( -name '*.png' -o -name '*.jpg' -o -name '*.jpeg' \) -print0 | \
xargs -0 -P8 -n2 mogrify -strip -thumbnail '1000>'
.PHONY: all
all: get_repository clean get build test deploy
.PHONY: get_repository

npm install dotenv

/**
* Find user by email
*/
async findUser(options) {
const {
email,
password,
} = options
if (!email) {
const userSchema = new mongoose.Schema({
password: {
type: String,
required: true,
minlength: 6,
maxlength: 128,
}, {
timestamps: true,
})
function colorLog(message, color) {

    color = color || "black";

    switch (color) {
        case "success":  
             color = "Green"; 
             break;
 case "info":