Skip to content

Instantly share code, notes, and snippets.

View fbohz's full-sized avatar
🐉
☕️

FelipeBZ fbohz

🐉
☕️
View GitHub Profile
@fbohz
fbohz / index.js
Last active August 20, 2020 14:49
largestSubarraySum(array)
function largestSubarraySum(array) {
let currentSum = 0
let largestSum = 0
function getCurrentSum(currentSum, currentNumber) {
let sum = currentNumber + currentSum
if (sum > 0) {
currentSum = sum
}
if (sum <= 0) {
const express = require('express');
const cors = require('cors');
const bodyParser = require('body-parser');
const path = require('path');
if (process.env.NODE_ENV !== 'production') require('dotenv').config();
// remember to have your .env file with your STRIPE_SECRET_KEY defined.
const stripe = require('stripe')(process.env.STRIPE_SECRET_KEY);
{
"name": "studio-ghibli-fan-app-backend",
"version": "1.0.0",
"engines": {
"node": "12.7.0",
"npm": "6.13.1"
},
"scripts": {
"client": "cd ../frontend && yarn start",
"server": "nodemon server.js",
import React, { useEffect, useReducer } from 'react';
import Card from '../card/card.component';
const INITIAL_STATE = {
currentUser: null,
searchQuery: 'Bret'
};
const reducer = (state, action) => {
@fbohz
fbohz / System Design.md
Created April 6, 2020 22:38 — forked from vasanthk/System Design.md
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?
@fbohz
fbohz / download
Created January 10, 2020 19:23 — forked from cocodrino/download
download subfolder github
For other users who just want to download a file/folder from github, simply use:
svn export <repo>/trunk/<folder>
e.g.
svn export https://github.com/lodash/lodash.com/trunk/docs
(yes, that's svn here. apparently in 2016 you still need svn to simply download some github files)
Courtesy: Download a single folder or directory from a GitHub repo