Skip to content

Instantly share code, notes, and snippets.

View eshaben's full-sized avatar

Erin Shaben eshaben

View GitHub Profile

CRUD!

Create (post route), Read (get route), Update (put route), Delete (delete route)

Let's create a CRUD requests!

The top of our file will look like this:

var express = require (‘express’)
var knex = require(‘../db/knex’)
var router = express.Router()
@eshaben
eshaben / full-stack-app.md
Last active July 27, 2017 20:50 — forked from bertoort/full-stack-app.md
Build a RESTful, full stack CRUD application.

Full Stack Application

By the end of this exercise you will build a full stack application with a client, server, and database.

** NOTE ** Do not copy and paste. This project is about solidifying concepts and finding gaps in your knowledge. It is OK to look back at previous work, however, you should understand what every line does and be able to write from scratch.

Tasks

0. Plan

Server & Database Master Setup (express-generator)

Dependencies

You will need express-generator installed globally to have access to the 'express' cli command

npm install -g express-generator

Module: Salesforce Platform Basics

  • Get Started with the Salesforce Platform
  • Discover Use Cases for the Platform
  • Understand the Salesforce Architecture
  • Navigate Setup
  • Power Up with AppExchange

Everything Salesforce

A collection of all my notes from learning the Salesforce platform. These notes follow along with the Prepare for Your Salesforce Platform Developer I Credential trailmix available on the Salesforce Trailhead.

Trails

Modules

Trail: Developer Beginner

Platform Development Basics

  • Get Started with the Salesforce Platform
  • Develop Without Code
  • Code with Salesforce Languages
  • Extend the Salesforce Platform

Data Modeling

Blockchain Basics

A blockchain, also known as a distributed ledger technology (DLT), is a special type of database.

Data is added through structures called blocks. Each block is built on top of the last, in order, and includes information to link back to the previous, parent block. The very first block in the chain is known as the genesis block.

These blocks are connected using hash functions. A hash function essentially takes in some data and passes it through a mathematical function and returns a hash of the data. The returned hashes are always the same length.

A collision can occur when two different inputs give us the same output. However, the odds of this occurring are astronomically low and there aren't any known SHA256 collisions. SHA256 hashing is used extensively in Bitcoin and Ethereum. What this means for Bitcoin and Ethereum is that each block in the chain can point back to its parent block using its hash. Blocks already mined cannot be edited, the hash cannot be changed.

import pandas as pd
data = pd.read_csv('~/Downloads/export-TxGrowth (1).csv')
print(data['Value'].sum())
import pandas as pd
data = pd.read_csv('~/Downloads/export-token-0x30d2a9f5fdf90ace8c17952cbb4ee48a55d916a7 (1).csv')
swapin = data.loc[data['From'] == '0x0000000000000000000000000000000000000000', 'Quantity'].sum()
swapout = data.loc[data['To'] == '0x0000000000000000000000000000000000000000', 'Quantity'].sum()
print(receive_sum, send_sum)