Skip to content

Instantly share code, notes, and snippets.

Avatar
🏡
WFH

Christopher Banh chrisngobanh

🏡
WFH
  • Irvine, California
View GitHub Profile
View tt-clock.ino
#include <Wire.h>
#include <DS1307RTC.h>
#include <Time.h>
#include <Wire.h>
#include <EEPROM.h>
#define A 13
#define B 12
#define C 11
View pirates-api-client.cs
// 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 Jan 28, 2017
Introduction to Async/Await for Chegg Frontend Roundtable
View 0.js
// 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).