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
FROM ubuntu | |
RUN DEBIAN_FRONTEND=noninteractive apt-get update -y && apt-get install rake | |
RUN mkdir -p /data | |
COPY . /data | |
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
FROM debian:stable | |
EXPOSE 8080 | |
RUN apt-get -y update && apt-get -y upgrade && apt-get -y install unzip wget openjdk-7-jdk | |
RUN wget -q http://download.jetbrains.com/upsource/upsource-1.0.12551.zip && unzip upsource-1.0.12551.zip | |
RUN cd Upsource && ./bin/upsource.sh start |
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 org.apache.camel.impl.DefaultCamelContext; | |
import org.apache.camel.model.RouteDefinition; | |
import org.apache.camel.model.RoutesDefinition; | |
import org.junit.Test; | |
import java.io.ByteArrayInputStream; | |
import java.io.InputStream; | |
import static org.junit.Assert.assertEquals; | |
import static org.junit.Assert.assertNotNull; |
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 org.junit.Before; | |
import org.junit.Test; | |
import java.util.ArrayList; | |
import java.util.List; | |
import java.util.stream.Collectors; | |
import static org.junit.Assert.assertEquals; | |
public class SortApplesTest { |
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 net.kaldarin.compilation; | |
import cpw.mods.fml.relauncher.Side; | |
import cpw.mods.fml.relauncher.SideOnly; | |
import net.minecraft.block.Block; | |
import net.minecraft.block.BlockFence; | |
import net.minecraft.block.BlockWall; | |
import net.minecraft.util.IIcon; | |
import net.minecraft.world.IBlockAccess; |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
# All Vagrant configuration is done here. The most common configuration | |
# options are documented and commented below. For a complete reference, | |
# please see the online documentation at vagrantup.com. |
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
get(new Route("/login") { | |
@Override | |
public Object handle(Request request, Response response) { | |
if (request.queryParams("completeAuthorization") != null) { | |
// Get temporary token and verifier returned by Fitbit from query string | |
String tempTokenReceived = request.queryParams("oauth_token"); | |
String tempTokenVerifier = request.queryParams("oauth_verifier"); | |
// Fetch user credentials from cache by temporary token from query string | |
APIResourceCredentials resourceCredentials = fitbit.getResourceCredentialsByTempToken(tempTokenReceived); | |
// Call method of Fitbit4J to get token credentials only if necessary (they haven't been cached yet) |
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 static org.junit.Assert.assertEquals; | |
import static org.junit.Assert.assertFalse; | |
import java.io.ByteArrayInputStream; | |
import java.io.ByteArrayOutputStream; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.OutputStream; | |
import org.apache.commons.codec.binary.Base64InputStream; |
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.gitblit.GitBlit | |
import com.gitblit.Keys | |
import com.gitblit.models.RepositoryModel | |
import com.gitblit.models.TeamModel | |
import com.gitblit.models.UserModel | |
import com.gitblit.utils.JGitUtils | |
import com.gitblit.utils.StringUtils | |
import java.text.SimpleDateFormat | |
import org.eclipse.jgit.api.CloneCommand | |
import org.eclipse.jgit.api.Git |