Skip to content

Instantly share code, notes, and snippets.

We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 5.
Number,Pokemon,Type 1,Type 2,HP,Attack,Defense,Speed,Special,GIF,PNG,Description
1,Bulbasaur,Grass,Poison,45,49,49,45,65,https://play.pokemonshowdown.com/sprites/bwani/bulbasaur.gif,https://play.pokemonshowdown.com/sprites/bw/bulbasaur.png,A strange seed was planted on its back at birth. The plant sprouts and grows with this Pokemon.
2,Ivysaur,Grass,Poison,60,62,63,60,80,https://play.pokemonshowdown.com/sprites/bwani/ivysaur.gif,https://play.pokemonshowdown.com/sprites/bw/ivysaur.png,"Often seen swimming elegantly by lake shores. It is often mistaken for the Japanese monster, Kappa."
3,Venusaur,Grass,Poison,80,82,83,80,100,https://play.pokemonshowdown.com/sprites/bwani/venusaur.gif,https://play.pokemonshowdown.com/sprites/bw/venusaur.png,"Because it stores several kinds of toxic gases in its body, it is prone to exploding without warning."
4,Charmander,Fire,,39,52,43,65,50,https://play.pokemonshowdown.com/sprites/bwani/charmander.gif,https://play.pokemonshowdown.com/sprites/bw/charmander.png,"Obviously prefer
@zcaceres
zcaceres / Include-in-Sequelize.md
Last active July 27, 2024 13:21
using Include in sequelize

'Include' in Sequelize: The One Confusing Query That You Should Memorize

When querying your database in Sequelize, you'll often want data associated with a particular model which isn't in the model's table directly. This data is usually typically associated through join tables (e.g. a 'hasMany' or 'belongsToMany' association), or a foreign key (e.g. a 'hasOne' or 'belongsTo' association).

When you query, you'll receive just the rows you've looked for. With eager loading, you'll also get any associated data. For some reason, I can never remember the proper way to do eager loading when writing my Sequelize queries. I've seen others struggle with the same thing.

Eager loading is confusing because the 'include' that is uses has unfamiliar fields is set in an array rather than just an object.

So let's go through the one query that's worth memorizing to handle your eager loading.

The Basic Query

@vasanthk
vasanthk / System Design.md
Last active July 27, 2024 18:36
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@staltz
staltz / introrx.md
Last active July 27, 2024 04:59
The introduction to Reactive Programming you've been missing
@cojohn
cojohn / basic-http-auth-node.js
Created February 8, 2012 18:53
Basic HTTP Authorization Header in Node.js
var key = <my key>,
secret = <my secret>,
https = require("https"),
https_options = {
"host": <host>,
"path": <path>,
"port": <port>,
"method": <method>,
"headers": {
"Authorization": "Basic " + new Buffer(key + ":" + secret, "utf8").toString("base64")