Skip to content

Instantly share code, notes, and snippets.

// ==UserScript==
// @name Kanji.koohii Stroke Order
// @namespace koohiistroke
// @description Adds kanji stroke order to the study and review sections on kanji.koohii.com
// @include http://kanji.koohii.com/study/kanji/*
// @include https://kanji.koohii.com/study/kanji/*
// @include http://kanji.koohii.com/review*
// @include https://kanji.koohii.com/review*
// @grant GM_xmlhttpRequest
// @version 1.1

FreeBSD on a MacBook Pro

Since 2008 or 2009 I work on Apple hardware and OS: back then I grew tired of Linux desktop (which is going to be MASSIVE NEXT YEAR, at least since 2001), and switched to something that Just Works. Six years later, it less and less Just Works, started turning into spyware and nagware, and doesn't need much less maintenance than Linux desktop — at least for my work, which is system administration and software development, probably it is better for the mythical End User person. Work needed to get software I need running is not less obscure than work I'd need to do on Linux or othe Unix-like system. I am finding myself turning away from GUI programs that I used to appreciate, and most of the time I use OSX to just run a terminal, Firefox, and Emacs. GUI that used to be nice and unintrusive, got annoying. Either I came full circle in the last 15 years of my computer usage, or the OSX experience degraded in last 5 years. Again, this is from a sysadmin/developer ki

// WTF's added by me, class cut down for brevity.
public class ModelAndView {
// WTF?!
/** View instance or view name String */
private Object view;
public ModelAndView(String viewName) {
this.view = viewName;
@kchien
kchien / 0001-Changed-expectation-to-use-regex.patch
Created December 10, 2010 00:28
rspec-expectations : include.feature change
From 2d348a3d4a69c167572b42ac65961b1c66d086f7 Mon Sep 17 00:00:00 2001
From: Kenrick Chien <ken.chien@gmail.com>
Date: Thu, 9 Dec 2010 19:22:26 -0500
Subject: [PATCH] Changed expectation to use regex.
---
features/matchers/include.feature | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/features/matchers/include.feature b/features/matchers/include.feature
/Users/kchien/.rvm/rubies/ruby-1.9.2-p0, this may take a while depending on your cpu(s)...
ruby-1.9.2-p0 - #fetching
ruby-1.9.2-p0 - #extracted to /Users/kchien/.rvm/src/ruby-1.9.2-p0 (already extracted)
ruby-1.9.2-p0 - #configuring
ruby-1.9.2-p0 - #compiling
ruby-1.9.2-p0 - #installing
ruby-1.9.2-p0 - updating #rubygems for /Users/kchien/.rvm/gems/ruby-1.9.2-p0@global
ruby-1.9.2-p0 - updating #rubygems for /Users/kchien/.rvm/gems/ruby-1.9.2-p0
ruby-1.9.2-p0 - adjusting #shebangs for (gem).
ruby-1.9.2-p0 - #importing default gemsets (/Users/kchien/.rvm/gemsets/)
ld: in /usr/local/lib/libiconv.2.dylib, missing required architecture x86_64 in file
collect2: ld returned 1 exit status
make[1]: *** [../../.ext/x86_64-darwin10.5.0/tcltklib.bundle] Error 1
make: *** [mkmain.sh] Error 1
package demo;
public abstract class Homer implements EatsDonuts{
public Homer() { }
public void eat() {
Donut d = getDonut(); //We want a new donut every time
//eat donut
}
//here is where Spring will do its magic and return a prototype
@kchien
kchien / How to connect a PS3 controller.md
Created October 10, 2015 18:41 — forked from hlung/How to connect a PS3 controller.md
How to connect PS3 controller on Mac OSX, PC

How to connect PS3 controller on Mac OSX, PC, etc.

This is how you connect PS3 controller to Mac OSX, PC, etc. when previously connected to a PS3. You will need a Mini USB cable. Overcome your laziness, get up of your chair, and go get one!

A big misconception is that keep holding PS button will reset the controller's pairing. It DOES NOT! From my testings, the controller keeps paring with the last machine it was CONNECTED VIA A USB CABLE.

Here are the steps:

@kchien
kchien / Warmup.md
Created April 14, 2018 02:51
Our warm-up is...a warm-up

Choose reasonable jumps all the way up so that you are not squatting something really close to your work weight. For example, if you are going to squat 275x5x3 for your work set today, 260x5 for your last warm-up is not a good choice as it could rob some of the energy you need to complete 275x5x3.

When you are pulling above 225 for your work set, start with 135x5.

What is a swarm?

Consists of:

  • multiple Docker hosts running in swarm mode
  • act as managers and workers

A given host can be a:

  • manager
  • worker
  • or perform both roles