Skip to content

Instantly share code, notes, and snippets.

@mox601
mox601 / test.txt
Created January 26, 2016 13:29
under-21
assertEquals(Player.AgeCategories.UNDER_21, PlayerImporter.ageCategoryFrom(PlayerImporter.YYYYMMDD.parseDateTime("1996-05-26")));
assertEquals(Player.AgeCategories.UNDER_21, PlayerImporter.ageCategoryFrom(PlayerImporter.YYYYMMDD.parseDateTime("1996-08-22")));
assertEquals(Player.AgeCategories.UNDER_21, PlayerImporter.ageCategoryFrom(PlayerImporter.YYYYMMDD.parseDateTime("1996-08-23")));
assertEquals(Player.AgeCategories.NONE, PlayerImporter.ageCategoryFrom(PlayerImporter.YYYYMMDD.parseDateTime("1989-08-22")));
assertEquals(Player.AgeCategories.NONE, PlayerImporter.ageCategoryFrom(PlayerImporter.YYYYMMDD.parseDateTime("1985-08-22")));
@mox601
mox601 / user.json
Last active January 26, 2016 11:40
user
{
"password": "a password",
"username": "a username",
"authorities": [{
"authority": "ADMIN"
}, {
"authority": "USER"
}],
"accountNonExpired": true,
"accountNonLocked": true,
@mox601
mox601 / npm-debug.log
Created January 26, 2016 10:32
yo cyclejs fails
0 info it worked if it ends with ok
1 verbose cli [ '/Users/mox/.nvm/v5.5.0/bin/node',
1 verbose cli '/Users/mox/.nvm/v5.5.0/bin/npm',
1 verbose cli 'start' ]
2 info using npm@3.5.3
3 info using node@v5.5.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle cyclejs-spike@0.0.0~prestart: cyclejs-spike@0.0.0
6 silly lifecycle cyclejs-spike@0.0.0~prestart: no script for prestart, continuing
7 info lifecycle cyclejs-spike@0.0.0~start: cyclejs-spike@0.0.0
{
"swagger": "2.0",
"info": {
"description": "Api Documentation",
"version": "1.0",
"title": "Api Documentation",
"termsOfService": "urn:tos",
"contact": {
"name": "Contact Email"
},
// TODO make this call async, using another threadpool
public void sendEmail(final String sender, final String to, final String subject,
final String content, final String contentType) {
// null checks
connectToSmtpTransport();
try {
//TODO from string to internet address
[
{
"url": "https://instagram.com/p/4lf-TTBms7/",
"title": "Instagram",
"popularity": 1332,
"tweets": [
{
"createdAt": "2015-07-01T08:44:49.000Z",
"id": 616165551078023200,
"id_str": "616165551078023168",
[
{
"url": "https://instagram.com/p/4jrzXsrZkN/",
"title": "Instagram",
"popularity": 2,
"tweets": [
{
"createdAt": "2015-06-30T17:01:18.000+02:00",
"id": 615897905300394000,
"id_str": "615897905300393985",
2015-06-11 10:36:35,718/UTC [RxComputationThreadPool-1] INFO com.ftr.finder.streaming.views.content.ContentObservable - status was excluded due to blacklist itemsStatusJSONImpl{createdAt=Thu Jun 11 05:36:05 UTC 2015, id=608870296825679873, text='【地震情報】11日14:30頃、三陸沖でM4.7の地震発生、最大震度1。震源は地下約10km。この地震による津波の心配はありません。 #地震 #jishin #災害 #saigai #岩手県 http://t.co/Gz6FtAsZA1', source='<a href="http://dokasen.com/" rel="nofollow">地震うさぎ</a>', isTruncated=false, inReplyToStatusId=-1, inReplyToUserId=-1, isFavorited=false, isRetweeted=false, favoriteCount=11, inReplyToScreenName='null', geoLocation=GeoLocation{latitude=39.6, longitude=144.1}, place=null, retweetCount=42, isPossiblySensitive=false, lang='ja', contributorsIDs=[], retweetedStatus=null, userMentionEntities=[], urlEntities=[], hashtagEntities=[HashtagEntityJSONImpl{text='地震'}, HashtagEntityJSONImpl{text='jishin'}, HashtagEntityJSONImpl{text='災害'}, HashtagEntityJSONImpl{text='saigai'}, HashtagEntityJSONImpl{text='岩手県'}], mediaEntities=[MediaEntityJSONImpl{id=6088
user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
import org.apache.commons.pool2.impl.GenericObjectPoolConfig;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.testng.annotations.Test;
import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisPool;
import redis.clients.jedis.JedisPubSub;
import redis.clients.jedis.exceptions.JedisConnectionException;
import static org.testng.Assert.assertNotNull;