Skip to content

Instantly share code, notes, and snippets.

View weerd's full-sized avatar

Diego Lorenzo weerd

View GitHub Profile
@weerd
weerd / index.js
Created October 1, 2021 02:35 — forked from mul14/index.js
JavaScript DocBlock Cheat Sheet
/**
* Description of this function.
*
* @param {string} name
* @param {Date} birthday
* @param {boolean=} isMarried Optional parameter.
* @param {string|null} [bloodType]
* @param {number=} [weight=0] Optional parameter with default value.
* @param {string[]} favoriteFoods Array of String.
*
@weerd
weerd / Phoenix Architectural Approach & Best Practices.md
Last active May 6, 2020 17:07
Phoenix Architectural Approach & Best Practices

Development

General

We prefer code that's more readable and easier to understand over code that's concise or obfuscated. We spend time thinking about the most understandable variable names in their respective context, and even favor longer, easier to understand variable names over abbreviated ones.

We also prefer DRY code, and favor small, single purpose functions over long functions that try to do too much.

Pull Requests

When merging PRs, make sure to use the "Squash and merge" options so that all commits are squashed into a single commit for what the PR is doing: image

@weerd
weerd / hunter2_lesson_example.json
Last active October 28, 2019 20:20
Hunter2 Lesson Example
{
"MRData": {
"xmlns": "http://ergast.com/mrd/1.4",
"series": "f1",
"url": "http://ergast.com/api/f1/2018/circuits.json",
"limit": "30",
"offset": "0",
"total": "21",
"CircuitTable": {
"season": "2018",
@weerd
weerd / snowplow_schema_string.json
Created May 28, 2019 21:24
Snowplow Schema As Type String
{
"type": "object",
"title": "snowplow_event",
"description": "Schema for Snowplow event data payload.",
"properties": {
"payload": {
"type": "string"
}
}
}
@weerd
weerd / snowplow_schema.json
Last active May 28, 2019 21:12
Testing Snowplow Schema
{
"type": "object",
"title": "snowplow_event",
"description": "Schema for Snowplow event data payload.",
"properties": {
"payload": {
"type": "string"
}
}
}
@weerd
weerd / sketch-shortcuts.md
Created February 23, 2018 16:01 — forked from jqtrde/sketch-shortcuts.md
Sketch Keyboard Shortcuts
  • Zoom
    • CMD 0 100%
    • CMD 1 Entire project
    • CMD 2 Zoom to selected object
  • Hide/Show Sidebars
    • CMD ALT 1 Hide left sidebar
    • CMD ALT 2 Hide right ridebar
    • CMD ALT 3 Hide both
    • CMD . Presentation mode
  • CTRL R Ruler
@weerd
weerd / gist:7fb63f207b8c00d97310fcf8b639933b
Last active February 27, 2020 16:43 — forked from dotcomputercraft/gist:b7283bd52f4b5389e748
How do I completely uninstall Node.js, and reinstall from beginning (Mac OS X)
the best way (I've found) to completely uninstall node + npm is to do the following:
go to /usr/local/lib and delete any node and node_modules
go to /usr/local/include and delete any node and node_modules directory
if you installed with brew install node, then run brew uninstall node in your terminal
check your Home directory for any local or lib or include folders, and delete any node or node_modules from there
go to /usr/local/bin and delete any node executable
You may need to do the additional instructions as well:
sudo rm /usr/local/bin/npm
@weerd
weerd / cities.json
Created July 18, 2017 18:01 — forked from Miserlou/cities.json
1000 Largest US Cities By Population With Geographic Coordinates, in JSON
[
{
"city": "New York",
"growth_from_2000_to_2013": "4.8%",
"latitude": 40.7127837,
"longitude": -74.0059413,
"population": "8405837",
"rank": "1",
"state": "New York"
},
@weerd
weerd / dosomething_checklist.md
Last active April 28, 2017 20:23
DoSomething Project Checklist

DoSomething Project Checklist

Whelp! Looks like you've run into an error or some major bug. Here's a quick list of things to run through and check before you feel the need to bug everyone on Slack:

In Laravel, did you check...

  • if composer packages were updated or new ones installed? Run $ composer install
  • if the cache needs to be cleared? Run $ php artisan cache:clear
@weerd
weerd / dosomething_projects_and_names.md
Last active March 22, 2017 13:33
DoSomething Projects & Marvel Names

Phoenix

  • Main platform that powers the DoSomething.org website; it has been burned down and risen from the ashes a few times now.
  • Marvel reference: A mutant heroine with virtually limitless matter and energy manipulation, telepathy, telekinesis, empathy, etc. She is one of the most powerful mutants.

Forge

  • The DoSomething.org pattern library.
  • Marvel reference: A mutant hero with superhuman intuitive talent at inventing and building; genius.

Northstar

  • The DoSomething user & identity service.