Skip to content

Instantly share code, notes, and snippets.

View DavidYKay's full-sized avatar

David Young-Chan Kay DavidYKay

View GitHub Profile
package printtextlocations;
import java.io.File;
import java.io.IOException;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import org.apache.pdfbox.exceptions.InvalidPasswordException;
@DavidYKay
DavidYKay / hello-hiccup.cljs
Created January 19, 2016 05:03
Examples for Clojurescript Workshop 1/19/2016
[:div.top-bar-right
[:ul.menu
[:li [:a {:href "#"} "History"]]
[:li [:a {:href "#"} "Log Out"]]]]
@DavidYKay
DavidYKay / square-root.clj
Created March 22, 2016 05:47
Implementation of the square root function, based on SICP Lecture 1A
(ns example.square-root)
(def tolerance 0.00000000001)
(defn square [x]
(* x x))
(defn avg [& args]
(/ (apply + args)
(count args)))

Keybase proof

I hereby claim:

  • I am davidykay on github.
  • I am davidykay (https://keybase.io/davidykay) on keybase.
  • I have a public key ASAt80YHH2ECRtfB7tculSNU4eKXpkzlzxGEmcFkA-f8wwo

To claim this, I am signing this object:

@DavidYKay
DavidYKay / .zshrc
Created May 2, 2016 17:48
Sexy two-line shell config for ZSH
#****************************************
#BEGIN PROMPT
#****************************************
function precmd {
local TERMWIDTH
(( TERMWIDTH = ${COLUMNS} - 1 ))
@DavidYKay
DavidYKay / Car.cpp
Created July 7, 2016 21:10
C++ Class / Header file example
#import "Car.h"
const int ACCELERATION_FACTOR = 10;
const int BRAKING_FACTOR = 30;
Car::Car() {
speed = 0;
}
void Car::accelerate(float intensity) {
@DavidYKay
DavidYKay / centroid.py
Created July 10, 2016 20:51
Best fit plane: vertices, normal, centroid
[ 0.21040269, 0.2235437, 0.07060108]
@DavidYKay
DavidYKay / dev_server.nginx
Created June 25, 2017 01:33
Nginx local SSL reverse proxy - helpful for development when you need SSL in front of your dev server.
upstream backends {
server localhost:3000;
}
server {
listen 80;
listen 443 ssl;
server_name foo.bar;
ssl_certificate dev.crt;
@DavidYKay
DavidYKay / Speech.md
Created June 10, 2018 00:35
Nick Wong wedding speech

Nick Wong: wedding toast

Introduction

I'm David Kay.
I'm Nick's first client in his new career as a coach. They say there's a sucker born every minute, and [pointing at self] now you know they're telling the truth! [Smile] What I'd like to do today is to take a moment to celebrate Dr. Nick Wong through the lens of a painful and candid story.

Beginning - Boy meets girl

Apple

When I met Nick, I was down on my luck.

Nick Wong: wedding toast

Introduction

I'm David Kay.
I'm Nick's first client in his new career as a coach. They say there's a sucker born every minute, and [pointing at self] now you know they're telling the truth! [Smile] What I'd like to do today is to take a moment to celebrate Dr. Nick Wong through the lens of a painful and candid story.

Beginning - Boy meets girl

Apple

When I met Nick, I was down on my luck.