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 RefSerializer extends JsonSerializer<Ref> { | |
@Override | |
public void serialize(Ref value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { | |
jgen.writeObject(value.getValue()); | |
} | |
} |
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
/** | |
* Edit the description of an event. | |
*/ | |
@AuthRequired | |
@POST | |
@Path("/event/description") | |
@Produces(MediaTypeUTF8.APPLICATION_JSON) | |
@JsonView(Event.JsonAll.class) | |
public Event saveDescription(final @FormParam("event") Key<Event> eventKey, final @FormParam("editor") String description) { |
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
<target name="deploy-prod" depends="auth, optimize"> | |
<property name="appid" value="theappid" /> | |
<tstamp> | |
<format property="vnum" pattern="yyyy-MM-dd-HHmm"/> | |
</tstamp> | |
<echo message="Deploying to version: ${vnum}" /> | |
<appcfg action="update" war="${staging.dir}"> | |
<options> |
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 blah; | |
import com.google.appengine.api.taskqueue.DeferredTask; | |
import com.google.common.base.Function; | |
import com.google.common.collect.Iterables; | |
import com.googlecode.objectify.Key; | |
import lombok.RequiredArgsConstructor; | |
import lombok.extern.slf4j.Slf4j; | |
import st.voo.tick.Queues; |
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 st.voo.tick.entity.util; | |
import com.googlecode.objectify.Key; | |
import com.googlecode.objectify.Ref; | |
/** | |
* A simple way to remove some boilerplate from some entity. |
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
/** | |
* Tests of what happens when some data is missing in the db | |
* | |
* @author Jeff Schnitzer <[email protected]> | |
*/ | |
public class MissingDataTests extends TestBase | |
{ | |
@com.googlecode.objectify.annotation.Entity | |
static class Foo { | |
@Id |
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 com.example; | |
import com.google.inject.Injector; | |
import org.jboss.resteasy.plugins.guice.ModuleProcessor; | |
import org.jboss.resteasy.plugins.server.servlet.FilterDispatcher; | |
import org.jboss.resteasy.spi.Registry; | |
import org.jboss.resteasy.spi.ResteasyProviderFactory; | |
import javax.inject.Inject; | |
import javax.inject.Singleton; | |
import javax.servlet.FilterConfig; |
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 com.orbitkit.houston.util.json; | |
import com.fasterxml.jackson.core.JsonParser; | |
import com.fasterxml.jackson.core.JsonProcessingException; | |
import com.fasterxml.jackson.databind.DeserializationContext; | |
import com.fasterxml.jackson.databind.deser.std.StdDeserializer; | |
import com.example.MoneySerializer.MoneyJson; | |
import org.joda.money.CurrencyUnit; | |
import org.joda.money.Money; |
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 com.foo.housekeeping; | |
import com.google.appengine.api.datastore.Entity; | |
import com.google.common.collect.Range; | |
import com.googlecode.objectify.Key; | |
import java.util.ArrayList; | |
import java.util.Collections; | |
import java.util.List; | |
import static com.googlecode.objectify.ObjectifyService.ofy; |
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
addEventListener('fetch', event => { | |
event.respondWith(handleRequest(event.request)) | |
}) | |
const encoder = new TextEncoder(); | |
const decoder = new TextDecoder(); | |
const SECRET_KEY_DATA = encoder.encode('YOUR SECRET KEY'); | |
function normalizeBase64(base64urlencoded) { | |
return base64urlencoded.replace(/-/g, '+').replace(/_/g, '/'); |
OlderNewer