Skip to content

Instantly share code, notes, and snippets.

View kim-nguyenkhn's full-sized avatar
🍕

Kim H. Nguyen kim-nguyenkhn

🍕
View GitHub Profile
@kim-nguyenkhn
kim-nguyenkhn / .zshrc
Last active February 12, 2022 18:31
Rubocop git diff'ed files
# Rubocop git diff'ed files
alias rubostaged="bin/rubocop -a `git diff --name-only --staged | grep '\.rb'`"
alias rubodiff="bin/rubocop -a `git diff --name-only | grep '\.rb'`""
@kim-nguyenkhn
kim-nguyenkhn / clean-docker.sh
Created February 12, 2022 05:06 — forked from buckett/clean-docker.sh
Cleans out old docker images and containers.
#!/bin/bash
# Clean all exited containers
docker ps -qaf status=exited | xargs docker rm
# Remove all unused images
docker images -f dangling=true -q | xargs docker rmi
@kim-nguyenkhn
kim-nguyenkhn / 01 iTunesSong.scpt
Created February 7, 2022 20:00 — forked from noopkat/01 iTunesSong.scpt
Live Stream 'Now Playing' live text label
on is_running(appName)
tell application "System Events" to (name of processes) contains appName
end is_running
set iTunesRunning to is_running("iTunes")
set noMusic to "no music is playing"
set song to noMusic
if iTunesRunning then
set song to run script "tell application \"iTunes\" to if player state is playing then \"now playing: \" & name of current track & \" by \" & artist of current track"

What I Wish I'd Known About Equity Before Joining A Unicorn

Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.

This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would

@kim-nguyenkhn
kim-nguyenkhn / difference.js
Created October 4, 2019 21:01 — forked from Yimiprod/difference.js
Deep diff between two object, using lodash
/**
* Deep diff between two object, using lodash
* @param {Object} object Object compared
* @param {Object} base Object to compare with
* @return {Object} Return a new object who represent the diff
*/
function difference(object, base) {
function changes(object, base) {
return _.transform(object, function(result, value, key) {
if (!_.isEqual(value, base[key])) {

Building your own Drone

  • Adhish
    • Materials
      • Buy from HobbyKing
      • Frame
        • 350 is a good size to start with
        • Can always buy a bigger frame if we want to "upgrade"
      • Propellers
      • Motors - each connected to an ESC (elec speed controller)
  • brushless motors - must be able to control each motor's speed separately to maneuver finely
  • Author of Employee to Entrepreneur

  • Advisor to companies

  • "50% of people dissatisfied with work (US, UK, AU)"

  • Criticism of "building a side hustle": "bringing worst level of work when you get home at 7pm"

  • prioritizing, automating, outsourcing: allows you to free up time to focus on your strengths and get into flow (!)

  • analogy of tenacity with learning how to surf: "getting back on the board"

  • build a healthy relationship with adversity: actively seek out uncomfortable situations

    • attempt to fail more often than you succeed
@kim-nguyenkhn
kim-nguyenkhn / Storybook.md
Last active December 6, 2018 20:17
My notes on Storybook.

tldr; Storybook is a great tool for creating a style guide that is easy to test and develop.

Storybook is a development environment for UI components. It allows you to browse a component library, view the different states of each component, and interactively develop and test components.

Storybook runs outside of your app. This allows you to develop UI components in isolation, which can improve component reuse, testability, and development speed. You can build quickly without having to worry about application-specific dependencies.

@kim-nguyenkhn
kim-nguyenkhn / Prototyping Workflow.md
Last active December 6, 2018 20:06
My list of technologies that I'm using right now for web prototyping.

Frontend

  • react-apollo

  • apollo-boost

  • graphql

  • emotion

  • react-router-dom

Backend

  • graphql-yoga