Skip to content

Instantly share code, notes, and snippets.

View chrisngobanh's full-sized avatar
🏡
WFH

Christopher Banh chrisngobanh

🏡
WFH
  • Milpitas, CA
  • 13:31 (UTC -07:00)
View GitHub Profile
#include <Wire.h>
#include <DS1307RTC.h>
#include <Time.h>
#include <Wire.h>
#include <EEPROM.h>
#define A 13
#define B 12
#define C 11
// References:
// API Calls: https://github.com/Pirates-Bounty/pirates-backend
// How to make HTTP requests in C# [StackOverflow]: http://stackoverflow.com/questions/4015324/http-request-with-post
// NOTE: This code is very rough because I don't actually know C#, so it won't work right off the bat
using System.Net.Http;
class PiratesAPIClient {
@chrisngobanh
chrisngobanh / 0.js
Last active January 28, 2017 23:54
Introduction to Async/Await for Chegg Frontend Roundtable
// To introduce Async Functions (Async/Await), we first need to go back to the discussion
// about synchronous vs asynchronous JavaScript and the benefits and downsides to both.
// The following example is a synchronous function call.
// The problem with synchronous operations is that they block the entire thread from
// doing more operations (JavaScript is single threaded).
// If it took 1 second to read that file, that means that you would not be handling events
// for a minute (on the browser-side, pretending that fs.readFileSync exists on the browser),
// and not handling requests (for Node.js).