I hereby claim:
- I am njb-said on github.
- I am njb_said (https://keybase.io/njb_said) on keybase.
- I have a public key whose fingerprint is 2E63 008B EE52 4BDF E8C5 EB7D 8337 28B1 142F D6D5
To claim this, I am signing this object:
public static void tell(CommandSender obj, String msg) { | |
obj.sendMessage(new TextComponent(color("&7" + msg))); | |
} |
package net.mcapi.uuid.handlers; | |
import java.util.UUID; | |
import java.util.concurrent.TimeUnit; | |
import net.mcapi.uuid.UUIDAPI; | |
import net.mcapi.uuid.UUIDHandler; | |
import net.mcapi.uuid.queries.APIQuery; | |
import net.mcapi.uuid.utils.UUIDUtils; |
I hereby claim:
To claim this, I am signing this object:
@EventHandler | |
public void onPing(ProxyPingEvent e) { | |
ServerPing old = e.getResponse(); | |
ServerPing reply = new ServerPing(); | |
// this playerCount variable is not defined because you can get it yourself.. (or if you use redis/mysql to store online player count) | |
reply.setPlayers(new ServerPing.Players(playerCount + 1, playerCount, old.getPlayers().getSample())); | |
reply.setDescription("whatever motd you want"); | |
reply.setFavicon(favicon); | |
reply.setVersion(old.getVersion()); | |
e.setResponse(reply); |
db.getCollection('Orders').aggregate([ | |
{ | |
'$match' : { 'products.outstanding' : { $gt: 0 }, 'status' : {$nin:['cancelled', 'dispatched']} } | |
}, | |
{ | |
'$unwind' : '$products' | |
}, | |
{ | |
'$group' : { | |
'_id': '$products._id', |
// Terrible code formatting but it works for me | |
// totalItems = total number of items (across all pages) | |
// perPage = number of items to show per page | |
// maxPages = maximum number of pages to show at once | |
// selectedPage = page currently on | |
// link = start of link, eg. /search (and then ?page is appended although this code doesn't fully do this) | |
// reverseSort = if the sortation should be backwards | |
module.exports.paginate = function(totalItems, perPage, maxPages, selectedPage, link, reverseSort) { | |
return new Promise(function(resolve, reject) { |
@mixin accent-colors($position, $direction) { | |
@if $direction == 'x' { | |
border-#{$position}-left-radius: 0; | |
border-#{$position}-right-radius: 0; | |
} @else { | |
border-top-#{$position}-radius: 0; | |
border-bottom-#{$position}-radius: 0; | |
} | |
border-#{$position}: 3px solid transparent; |
if(config.discord.listToken) { | |
var dblapi = require('dblapi.js'); | |
var dbl = new dblapi(config.discord.listToken, self.bot); | |
dbl.on('error', (err) => { | |
logger.error('Error for dblapi.js', err); | |
bugsnag.notify(err); | |
}); | |
logger.debug('[BOT] Linked to discordbots.org - updating stats periodically'); | |
} else { |