Skip to content

Instantly share code, notes, and snippets.

@coker-deca
coker-deca / dropdown.jsx
Last active March 24, 2022 16:42 — forked from bnorton/dropdown.jsx
Chameleon React.js Developer - Technical exercise
/*
Prompt:
We have defined a basic dropdown via the Dropdown and DropdownItem components below, with example usage
in the ExampleNav component. The Dropdown and DropdownItem components have some problems, and also
have room for improvements (doesn't everything?) A couple items TODO here (make sure to explain with comments!)
0. How are you today? 😊
1. Please fix any obvious issues you see with the dropdown and then save your gist.
2. Please then make improvements to the dropdown and then save your gist again.
@coker-deca
coker-deca / userSchema.js
Created June 5, 2021 21:19 — forked from jzellis/userSchema.js
Boilerplate for simple Mongoose user schema
/*
I find myself recreating user models for Mongoose every time I start a new project, so I thought I'd create a generic schema for a user model that can be added to or modified as need be.
This is loosely based on the Meteor user model (using a "profile" sub-object for the user's personal information). It also includes an optional geolocation point for the user, and Mongoose timestamps, as well as a pre("save") function to bcrypt the user password and a comparePassword() function.
Just save this file wherever you store your models and do something like const Users = include('./models/userSchema.js') and you can just use it as a standard Mongoose user model.
The username/email address definitions were copied from this tutorial: https://thinkster.io/tutorials/node-json-api/creating-the-user-model
@coker-deca
coker-deca / machine.js
Created November 6, 2020 13:06
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
SELECT round(sum(NA_Sales)/(sum(NA_Sales)+sum(EU_Sales)+sum(JP_Sales)+sum(Other_Sales))*100)
AS 'NA_Sales_Percentage'
FROM 'P9-ConsoleGames';
SELECT Name
FROM P9ConsoleGames
ORDER BY Platform ASC, Year DESC;
@coker-deca
coker-deca / gist:ae914b18e4086cba4cb677076076751b
Created April 20, 2020 22:01 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@coker-deca
coker-deca / PY0101EN-3-1-Conditions.ipynb
Created December 19, 2019 22:11
Created on Cognitive Class Labs
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@coker-deca
coker-deca / PY0101EN-3-1-Conditions.ipynb
Created December 13, 2019 07:46
Created on Cognitive Class Labs
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@coker-deca
coker-deca / PY0101EN-2-4-Dictionaries.ipynb
Created December 12, 2019 22:59
Created on Cognitive Class Labs
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.