Skip to content

Instantly share code, notes, and snippets.

View kevin-lee's full-sized avatar
🏠
Working from home

Kevin Lee kevin-lee

🏠
Working from home
View GitHub Profile
@kevin-lee
kevin-lee / handlebars-helpers.js
Last active August 29, 2015 13:57
Helpers for Handlebars.js
/**
* Helpers for Handlebars.
* @author Lee, SeongHyun (Kevin)
* @version 0.0.1 (2014-03-15)
*/
/**
* e.g.)
* {{{#cond this.isEnabled "<b>Enabled</b>" "<div class='alert-danger'>Disabled</div>"}}}
* equivalent to
var logger = console ? console : {
"log": function() {
// It does nothing.
}
};
/**
* Number.prototype.format(n, x, s, c)
*
* @param integer n: length of decimal
import scala.language.implicitConversions
object Test extends App {
case class SomethingElse(value: String)
implicit class ToSomethingElse(val value: String) {
def toSomethingElse = SomethingElse("###" + value)
}
@kevin-lee
kevin-lee / override-gist.css
Last active August 29, 2015 14:18
CSS to fix unwanted margin issue on embedded Gist
.gist .line-numbers {
line-height: 1.2;
}
@kevin-lee
kevin-lee / INSTALL
Created April 11, 2015 06:01
Correct GitHub-Wikifier Installation
curl https://raw.githubusercontent.com/Kevin-Lee/GitHub-Wikifier/master/pre-commit > .git/hooks/pre-commit;
chmod +x .git/hooks/pre-commit;
@kevin-lee
kevin-lee / sbt.md
Last active August 29, 2015 14:24
A few tips for sbt

sbt

Change the Default Ivy Home

sbt -Dsbt.ivy.home=/your/local/path/.ivy

Then the dependencies and the other files downloaded for sbt will be stored in the cache folder of the new location.

e.g.)

@kevin-lee
kevin-lee / SomeMapExample.java
Last active August 29, 2015 14:25
Some Java 8 example code
package cc.kevinlee.examples;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import java.util.Optional;
import static cc.kevinlee.examples.KeyValPair.*;
/**
@kevin-lee
kevin-lee / Wide GitHub Issues, Wiki and Pull Requests.md
Last active September 4, 2015 04:28
Stylish: Wide GitHub Wiki, Issues and Pull Requests

Wide GitHub Wiki, Issues and Pull Requests

This is a modified version of GitHub Wide. I didn't write it entirely but modified a bit.

Chrome

Change Applies to to URLs matching the regexp and put the following pattern.

https://github.com/[^/]+/[^/]+/(((wiki|issues)([?/][^/]*)*)|(pull/[0-9]+(([\/])((?!files).)*)?))
@kevin-lee
kevin-lee / TakeLinks.md
Last active September 7, 2015 05:13
Take all the names and URLs from HTML
@kevin-lee
kevin-lee / LookAndSaySequenceExample.java
Created September 8, 2012 18:48
Look-and-say sequence examples written in Java (by Kevin) / Please visit http://goo.gl/X94gN for more details.
package com.lckymn.kevin.example;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
/**
* Visit http://goo.gl/X94gN for more details.
*
* @author Lee, SeongHyun (Kevin) / <a href="http://blog.lckymn.com">Kevin&apos;s Blog</a>