View policies.go
package main
import (
type Policy struct {
Name string
View gist:5499954
public void run(ApiServiceConfiguration config, Environment env) throws Exception {
// works
env.getObjectMapperFactory().setDateFormat(new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ"));
// works
env.getObjectMapperFactory().setDateFormat(new ISO8601DateFormat.getInstance());
// doesn't work
View input.json
# Add this to your .bashrc or .bash_profile to set up "bookmarks" for your directories.
# When in a directory, type "s <name>" to store the current path as a bookmark with that name.
# To move to a bookmark, type "g <name>". Tab completion also works!
# To list all bookmarks, type "l".
# Credit to: Karthick from
function s {
cat ~/.sdirs | grep -v "export DIR_$1=" > ~/.sdirs1
mv ~/.sdirs1 ~/.sdirs
View shortest_lines.rb
num_longest = ARGV[1].to_i
longest_lines = []
shortest_len = -1
infile =[0], "r")
while ( line = infile.gets )
unless line.length > shortest_len