This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.typesafe.zinc.Setup | |
import java.io.File | |
import javax.servlet._ | |
import xsbti.F0 | |
class ZincFilter extends Filter { | |
private var configVar: FilterConfig = _ | |
def config = configVar | |
class ServletLogger(context: ServletContext) extends xsbti.Logger { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ImmutableFactory<T> { | |
private final Map<String, Object> propertiesMap = [:] | |
private final Class<T> clazz | |
def ImmutableFactory(Class<T> clazz) { | |
this.clazz = clazz | |
} | |
T create() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@groovy.transform.Immutable | |
class A { | |
int x | |
} | |
@groovy.transform.Immutable | |
class B { | |
int y | |
@Delegate | |
A a = new A([:]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class S { | |
def propertiesAsMap() { | |
this.metaClass.properties.collectEntries { p -> | |
[(p.name): p.modifiers] | |
} | |
} | |
} | |
class A extends S { | |
static int DEFAULT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
Next |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
org.gradle.api.tasks.TaskInstantiationException: Could not create task of type 'SshTask'. | |
at org.gradle.api.internal.project.taskfactory.TaskFactory$1.call(TaskFactory.java:126) | |
at org.gradle.api.internal.project.taskfactory.TaskFactory$1.call(TaskFactory.java:121) | |
at org.gradle.api.internal.AbstractTask.injectIntoNewInstance(AbstractTask.java:148) | |
at org.gradle.api.internal.project.taskfactory.TaskFactory.createTaskObject(TaskFactory.java:121) | |
at org.gradle.api.internal.project.taskfactory.TaskFactory.createTask(TaskFactory.java:81) | |
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory.createTask(AnnotationProcessingTaskFactory.java:99) | |
at org.gradle.api.internal.project.taskfactory.DependencyAutoWireTaskFactory.createTask(DependencyAutoWireTaskFactory.java:39) | |
at org.gradle.api.internal.tasks.DefaultTaskContainer.create(DefaultTaskContainer.java:52) | |
at org.gradle.api.internal.project.AbstractProject.task(AbstractProject.java:958) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@groovy.transform.ToString | |
class A { | |
//static final int P = 100 | |
int x | |
} | |
A.metaClass.P = 100 | |
def a = new A() | |
a.with { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# This script is called with the following arguments: | |
# Arg Name Example | |
# $1 Interface name ppp0 | |
# $2 The tty ttyS1 | |
# $3 The link speed 38400 | |
# $4 Local IP number 12.34.56.78 | |
# $5 Peer IP number 12.34.56.99 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# initramfs script for Linux 2.6 LVM/RAID | |
echo -e “\x1b[1;32m *\x1b[0m Setting up filesystems” | |
/bin/mount -t proc none /proc | |
/bin/mount -t sysfs none /sys | |
/bin/mount -t tmpfs none /dev | |
/bin/mount -t tmpfs none /etc | |
/sbin/mdev -s |