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.fasterxml.jackson.core.JsonGenerator; | |
import com.fasterxml.jackson.core.JsonProcessingException; | |
import com.fasterxml.jackson.databind.JsonSerializer; | |
import com.fasterxml.jackson.databind.SerializerProvider; | |
import java.io.IOException; | |
public class UiNotificationSerializer extends JsonSerializer<MyDto> { | |
@Override public void serialize(MyDto dto, JsonGenerator generator, SerializerProvider serializerProvider) throws IOException, JsonProcessingException { |
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
alias mongo-connect="echo \"db.auth('user','password')\" | pbcopy; ssh -t dashboard \"mongo 10.0.1.107:27017/db_name\"" |
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
IFS=$'\n'; arr=(`for d in {0..182}; do date -d "2015-12-01 + $d days" +'%Y%m%d'; done`); for i in ${arr[@]} ; do aws s3 ls s3://bucket-name/production/dt=$i/ | tr -s " " | cut -f3 -d" " | paste -sd+ - | bc | numfmt --to=iec-i --suffix=B --padding=7 ; done |
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
if (GrowInsights.UserInsights.PayInsights.PayRankByGenre[Genre.Educational] > 3) { | |
// Adapt gameplay to a potential payer | |
// Examples: offer welcome bundle, block ads, | |
// report user as payer to your push notification platform etc. | |
} |
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
var emails = {}; | |
db.users.find().sort({_id: -1}).forEach(function(d) { | |
var email = d.email.split('@')[1]; | |
emails[email] |= 0; | |
emails[email]++; | |
}); | |
var sortable = []; | |
for (var email in emails) | |
sortable.push([email, emails[email]]) |
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
db.users.aggregate( | |
{ | |
"$match": { | |
created_at: { $gte: ISODate("2014-09-01T00:00:00Z") } | |
} | |
}, | |
{ | |
"$project": { | |
_id: 0, | |
"isoDate": { $substr: [ "$created_at", 0, 10 ] } |
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
db.users.find({created_at: {$gt: new ISODate('2015-03-29 00:53:55.997Z')}}).sort({_id: 1}).forEach(function(d) { | |
var firstName = d.name.split(/\s+/)[0]; | |
var match = d.name.match(/.*\s+(.*)/); | |
var lastName = match ? match[1] : ''; | |
print(d.email + '\t' + firstName + '\t' + lastName); | |
}); |
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
{ | |
"name": "unity-mass-labeler", | |
"version": "0.0.1", | |
"description": "", | |
"main": "mass-labeler.js", | |
"dependencies": { | |
"lodash": "^3.5.0", | |
"recursive-readdir": "^1.2.0" | |
}, | |
"devDependencies": {}, |
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
{ | |
"currencyPacks" : [ | |
{ | |
"purchasableItem" : { | |
"marketItem" : { | |
"consumable" : 1, | |
"price" : 1.99, | |
"androidId" : "com.my.game.packs.bag_of_coins", | |
"iosId" : "com.my.game.packs.bag_of_coins" | |
}, |
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 bash | |
# | |
# An example init script for running a Node.js process as a service | |
# using Strongloop's slc as the process monitor. For more configuration options | |
# associated with slc, see: http://docs.strongloop.com/display/public/SLC/slc+run. | |
# This script assumes you've installed slc globally with `npm install -g strongloop`. | |
# | |
# You will need to set the environment variables noted below to conform to | |
# your use case, and change the init info comment block. | |
# |
NewerOlder