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
trait Unique { | |
val id: String | |
} | |
/** | |
* Abstraction over a standard "Indexed" table. | |
*/ | |
trait CrudComponent{ this: Profile => | |
import profile.simple._ |
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.rabbitmq.client.Connection; | |
import com.rabbitmq.client.Channel; | |
import com.rabbitmq.client.ConnectionFactory; | |
//import com.rabbitmq.client.QueueingConsumer; | |
import com.rabbitmq.client.GetResponse; | |
import com.rabbitmq.client.AMQP; | |
//import com.rabbitmq.client.*; | |
//import com.rabbitmq.client.MessageProperties; | |
//import com.rabbitmq.client.AlreadyClosedException; |
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 java.io.{ FileOutputStream, File } | |
import scala.io.Source | |
import scala.util.matching.Regex | |
object UpdateCopyrightHeaders extends App { | |
val encoding = "utf-8" | |
val copyrightLines: Seq[String] = "Copyright (C) 1894-2014 Example Corp. <http://www.example.com>".split("\n") | |
val srcDir = new File("src/") | |
def updateCopyright(file: File): Unit = { |
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
#!/sbin/runscript | |
# GitLab init script for Gentoo Linux | |
# see https://github.com/gitlabhq/gitlabhq/blob/master/doc/installation.md | |
GITLAB_BASE=/home/gitlab/gitlab | |
GITLAB_USER=gitlab | |
depend() { | |
need net mysql redis | |
} |
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
# @title Add JDT templates that set Guava Preconditions | |
# @description Sets templates that surround expressions with Preconditions.check{NotNull,Argument,State}. Warning: this can replace any previously defined template so use with care. | |
# @task_type LASTMOD | |
# | |
# Written by Robert Konigsberg, 02-20-2012. | |
# See http://blatherberg.wordpress.com/2012/02/20/inserting-guava-preconditions-in-eclipse | |
# | |
file_export_version=3.0 | |
/instance/org.eclipse.jdt.ui/org.eclipse.jdt.ui.text.custom_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="false" context\="java" deleted\="false" description\="Surround expression with checkNotNull Precondition." enabled\="true" name\="checkNotNull (instance)">${\:import(com.google.common.base.Preconditions)}Preconditions.checkNotNull(${word_selection})</template><template autoinsert\="false" context\="java" deleted\="false" description\="Surround expression with checkNotNull Precondition (with static import)." enabled\="true" name\="checkNo |
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
${retIt:newType(java.lang.Iterable)}<${iterable_type}> ${name:newName(retIt)} = ${itbls:newType(com.google.common.collect.Iterables)}.filter(${iterable}, new ${pred:newType(com.google.common.base.Predicate)}<${iterable_type}>() { | |
@Override public boolean apply(${iterable_type} ${input}) { | |
return ${false}; | |
} | |
}); |