Skip to content

Instantly share code, notes, and snippets.

Hidetake Iwata int128

Block or report user

Report or block int128

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View add.groovy
def x = {}
def y = {}
def a = [k: x, l: 0, m: 'a']
def b = [k: y, l: 1]
println x
println y
println a
println b
int128 / gist:10613715
Last active Aug 29, 2015
Create an immutable object by a closure instead of the hash constructor
View gist:10613715
class ImmutableFactory<T> {
private final Map<String, Object> propertiesMap = [:]
private final Class<T> clazz
def ImmutableFactory(Class<T> clazz) {
this.clazz = clazz
T create() {
int128 / immutable.groovy
Last active Aug 29, 2015
could not initialize immutable in immutable by map
View immutable.groovy
class A {
int x
class B {
int y
A a = new A([:])
int128 / plus-settings.groovy
Last active Aug 29, 2015
Enumerate properties of an object using meta class
View plus-settings.groovy
class S {
def propertiesAsMap() { { p ->
[( p.modifiers]
class A extends S {
static int DEFAULT
int128 / gist:11244516
Created Apr 24, 2014
Macro to trim or append trailing LF
View gist:11244516
Sub TrimTrailingLFInSelection()
Dim c As Range
For Each c In Selection
If Right(c.Text, 1) = vbLf Then
c.Value = Left(c.Text, Len(c.Text) - 1)
End If
int128 / gist:1be8b651c3f42fa03858
Created May 10, 2014
@javax.inject.Inject does not work on Gradle plugin
View gist:1be8b651c3f42fa03858
org.gradle.api.tasks.TaskInstantiationException: Could not create task of type 'SshTask'.
at org.gradle.api.internal.project.taskfactory.TaskFactory$
at org.gradle.api.internal.project.taskfactory.TaskFactory$
at org.gradle.api.internal.AbstractTask.injectIntoNewInstance(
at org.gradle.api.internal.project.taskfactory.TaskFactory.createTaskObject(
at org.gradle.api.internal.project.taskfactory.TaskFactory.createTask(
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory.createTask(
at org.gradle.api.internal.project.taskfactory.DependencyAutoWireTaskFactory.createTask(
at org.gradle.api.internal.tasks.DefaultTaskContainer.create(
at org.gradle.api.internal.project.AbstractProject.task(
int128 / gist:af097d5d5a82bc6dd4b6
Created May 22, 2014
Adding static property on runtime
View gist:af097d5d5a82bc6dd4b6
class A {
//static final int P = 100
int x
A.metaClass.P = 100
def a = new A()
a.with {







  • Gentoo Linux
  • 2.6.31-gentoo-r10 (KVM hypervisor/KVM guest)
  • net-fs/nfs-utils-1.1.4-r1



Fix Java plugin version of Google Chrome

Launch regedit.exe and open following key:


Fix or create item there:

Path=C:\Program Files\Java\jdk1.7.0_07\jre\bin\plugin2\npjp2.dll

You can’t perform that action at this time.