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 SpecialEclipsePlugin extends SpecialPlugin { | |
@Override | |
public void apply(Project project) { | |
eggExtension(project).create("eclipse", EclipseExtension) | |
project.apply(plugin: 'eclipse') | |
project.afterEvaluate { | |
configureEclipseClasspath(it) |
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
public class FileDownloader extends AbstractExtension { | |
private boolean overrideContentType = true; | |
/** | |
* Creates a new file downloader for the given resource. To use the | |
* downloader, you should also {@link #extend(AbstractClientConnector)} the | |
* component. | |
* | |
* @param resource |
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
.window-frame, .window-frame:backdrop { | |
box-shadow: 0 0 0 black; | |
border-style: none; | |
margin: 0; | |
border-radius: 0; | |
} | |
.titlebar { | |
border-radius: 0; | |
} |
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
package ch.hsr.geohash; | |
import static org.junit.Assert.*; | |
import java.util.Arrays; | |
import java.util.List; | |
import org.junit.Test; | |
import ch.hsr.geohash.queries.GeoHashCircleQuery; |
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
require File.join(File.dirname(__FILE__), "..", "spec_helper") | |
require File.join(File.dirname(__FILE__), "fake_document") | |
include Redcar | |
describe AutoIndenter::Analyzer do | |
scala = <<-SCALA | |
package ch.mollusca.stomp.frame |
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
@Override | |
public int hashCode() { | |
return Objects.hashCode(describe(), markerType()); | |
} | |
@Override | |
public boolean equals(Object obj) { | |
if (obj == this) { | |
return true; | |
} |
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
# http://henrik.nyh.se/2008/12/git-dirty-prompt | |
# http://www.simplisticcomplexity.com/2008/03/13/show-your-git-branch-name-in-your-prompt/ | |
# username@Machine ~/dev/dir[master]$ # clean working directory | |
# username@Machine ~/dev/dir[master*]$ # dirty working directory | |
function parse_git_dirty { | |
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit, working directory clean" ]] && echo "*" | |
} | |
function parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/" |
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
# Display the current git branch and wether its dirty | |
# https://gist.github.com/964107/ | |
# username@Machine ~/dev/dir[master]$ # clean working directory | |
# username@Machine ~/dev/dir[master*]$ # dirty working directory | |
# username@Machine ~/dev/dir[master](1↑2↓)$ # clean working directory, but changes incoming and outgoing | |
function parse_git_dirty { | |
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit, working directory clean" ]] && echo "*" | |
} | |
function git_ahead_behind { |
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
build_package_stdout_patch() { | |
wget 'http://bugs.ruby-lang.org/attachments/download/1931/stdout-rouge-fix.patch' | |
patch -p1 < stdout-rouge-fix.patch | |
} | |
require_gcc | |
install_package "ruby-1.8.7-p358" "http://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p358.tar.gz" stdout_patch standard | |
install_package "rubygems-1.6.2" "http://production.cf.rubygems.org/rubygems/rubygems-1.6.2.tgz" ruby | |
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
#!/usr/bin/env ruby | |
status = `git status -sbz 2> /dev/null` | |
ahead = (status.match /ahead (\d+)/) | |
behind = (status.match /behind (\d+)/) | |
print "[" if ahead || behind | |
print "↑#{ahead[1]}" if ahead | |
print "↓#{behind[1]}" if behind | |
print "]" if ahead || behind |
OlderNewer