This file contains hidden or 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
| module Precompiler | |
| include Extension | |
| first_time do | |
| # Define task not specific to any projet. | |
| desc 'Precompile jsps' | |
| Project.local_task('precompile' => 'compile') { |name| "Precompiling #{name}" } | |
| end | |
| before_define do |project| |
This file contains hidden or 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
| AWS_JAVA_SDK_BUILD_TOOLS = ["com.amazonaws:aws-java-sdk:jar:1.3.10", | |
| "com.amazonaws:aws-java-sdk-flow-build-tools:jar:1.3.10"] | |
| # The following is assumed to be embedded inside a project definition, otherwise | |
| # you will need to pass the project to the task. | |
| ... | |
| # Task for Generating Sources via Java APT, note this overwrites any current source | |
| task :apt do | |
| rm_rf project.path_to(:src, :generated, :java) |
This file contains hidden or 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
| set-option -g prefix C-a | |
| bind-key C-a last-window | |
| # Get scrolling in pane to work | |
| set -g terminal-overrides 'xterm*:smcup@:rmcup@' | |
| # Set up horizontal and vertical splitting | |
| unbind % | |
| bind \ split-window -h | |
| bind - split-window -v |
This file contains hidden or 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 foo(n: Int) = (i: Int) => n + i |
This file contains hidden or 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
| # Usage: | |
| # thor maxmind --version=VERSION --repositoryUrl=URL --repositoryId=ID [--temp=/tmp] | |
| class Maxmind < Thor | |
| include Thor::Actions | |
| class_options :version => :string, | |
| :repositoryUrl => :string, | |
| :repositoryId => :string, | |
| :temp => File.join(ENV["HOME"], "Downloads") | |
This file contains hidden or 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
| <properties> | |
| <geocity.version>2011-10-25</geocity.version> | |
| </properties> | |
| ... | |
| <dependency> | |
| <groupId>com.maxmind</groupId> | |
| <artifactId>geocity</artifactId> | |
| <version>${geocity.version}</version> |
This file contains hidden or 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
| public class MyLookupServiceImpl implements ApplicationContextAware { | |
| private com.maxmind.geoip.LookupService lookupService; | |
| private String dataPath; // classpath location of .dat file, e.g GeoIPCity.dat | |
| private ApplicationContext context; | |
| // constructor that allows us to inject a LookupService, e.g. for testing | |
| public MyLookupServiceImpl(com.maxmind.geoip.LookupService lookupService) { | |
| this.lookupService = lookupService; | |
| } |
This file contains hidden or 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
| (ns fizzbuzz.core) | |
| (defn multiple? [x n] | |
| (= 0 (mod x n))) | |
| (defn fizzbuzz [number] | |
| (if (multiple? number 3) | |
| (if (multiple? number 5) (prn "FizzBuzz") (prn "Fizz")) | |
| (if (multiple? number 5) (prn "Buzz") (prn number)))) |
This file contains hidden or 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
| function boot-tmux { | |
| echo -ne "\033]0;$@\007" | |
| tmux new-session -d -s $@ | |
| tmux send-keys -t $@ "teamocil --here $@" C-m | |
| tmux attach-session -t $@ | |
| } |
This file contains hidden or 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
| [Tue May 12 11:33:31 ccoco@horus finatra-hello-world (master)]$ ../../sbt clean test | |
| downloading sbt-launch.jar from http://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt-launch/0.13.8/sbt-launch.jar | |
| [info] Loading project definition from /Users/ccoco/github/twitter/finatra/examples/finatra-hello-world/project | |
| [info] Updating {file:/Users/ccoco/github/twitter/finatra/examples/finatra-hello-world/project/}finatra-hello-world-build... | |
| [info] Resolving org.fusesource.jansi#jansi;1.4 ... | |
| [info] Done updating. | |
| [info] Set current project to finatraHelloWorld (in build file:/Users/ccoco/github/twitter/finatra/examples/finatra-hello-world/) | |
| [success] Total time: 0 s, completed May 12, 2015 11:34:00 AM | |
| [info] Updating {file:/Users/ccoco/github/twitter/finatra/examples/finatra-hello-world/}finatraHelloWorld... | |
| [info] Resolving jline#jline;2.12.1 ... |
OlderNewer