Skip to content

Instantly share code, notes, and snippets.


Ryan Wu ryanhanwu

View GitHub Profile
ryanhanwu / .env
Created Feb 23, 2021 — forked from joshdholtz/.env
Using Dotenv and environment variables with fastlane
View .env
STUFF = this is some stuff
View MinHeap.js
class MinHeap {
constructor() {
this.heap = [];
getMin() {
return this.heap[0];
insert(node) {
/* Inserting the new node at the end of the heap array */
ryanhanwu / Fastfile
Created Feb 2, 2021
Build React Native Android App and submit to Firebase App Distribution via Github Actions
View Fastfile
platform :android do
desc "Deploy a new version to the Firebase App Distribution"
lane :beta_ci do
gradle(task: "clean assembleRelease")
app: "1:123123123123123123123", #
service_credentials_file: "./firebase-app-distribution.json", # Created from android_workflow.yml steps
ryanhanwu / index.js
Created Jan 29, 2021
Hubspot Code Assessment
View index.js
const fetch = require('node-fetch');
const dayjs = require('dayjs')
const DATASET_API = ""
const RESULT_API = ""
const findIdealStartDatePartners = (country, partners) => {
let partnersByDate = {}
let mostAvailDate = null
let maxAttendee = -1
ryanhanwu / index.js
Created Jan 22, 2021
A gist for first Tailwind CSS page
View index.js
export default function Home() {
return (
<main className="container mx-auto px-4">
<section className="py-12 px-4 text-center">
<div className="w-full max-w-2xl mx-auto">
<span className="text-sm font-semibold">Next.js + Tailwind CSS + Firebase Cloud Functions + Github Actions</span>
< h2 className = "text-5xl mt-2 mb-6 leading-tight font-semibold font-heading" >Project Header</h2>
<a className="text-indigo-600 hover:underline" href="#">Learn more &raquo;</a>
ryanhanwu / Makefile
Created May 5, 2020 — forked from jonschlinkert/Makefile
Simple Makefile to build, run, tag and publish a docker containier to AWS-ECR
View Makefile
# import config.
# You can change the default config with `make cnf="config_special.env" build`
cnf ?= config.env
include $(cnf)
export $(shell sed 's/=.*//' $(cnf))
# import deploy config
# You can change the default deploy config with `make cnf="deploy_special.env" release`
dpl ?= deploy.env
include $(dpl)
View index.js
const csv = require('csv-parser');
const fs = require('fs');
const endPoints = {}
console.log("digraph g{")
console.log("node [style=filled];")
.on('data', (row) => {
## Update Hostname
sudo hostname YOUR_HOSTNAME
# UPDATE your hostname and change it to YOUR_HOSTNAME
vim /etc/hostname
# Update your hosts
echo " YOUR_HOSTNAME" >> /etc/hosts
ryanhanwu / vpn.applescript
Created Jan 16, 2020
Apple script for automatically create VPN
View vpn.applescript
on create_vpn_service(vpn_name)
tell application "System Preferences"
reveal pane ""
tell application "System Events"
tell process "System Preferences"
tell window 1
click button 1 -- "Add Service"