Skip to content

Instantly share code, notes, and snippets.

View thunder-spb's full-sized avatar
:octocat:
Stressing things

Alexzander thunder Shevchenko thunder-spb

:octocat:
Stressing things
View GitHub Profile
@thunder-spb
thunder-spb / wg-api-2.0-player-info-ru
Last active December 21, 2015 08:38
Player info, API 2.0, RU cluster
{
"status": "ok",
"count": 1,
"data": {
"461": {
"clan": {
"role_i18n": {
"ru": "ротный командир",
"fr": "ротный командир",
"en": "ротный командир",
@thunder-spb
thunder-spb / wg-api-2.0-player-search
Last active December 21, 2015 08:39
Search player on RU cluster example
{
"status": "ok",
"count": 1,
"data": [
{
"date": 1376899992,
"hours_ago": 24,
"stat": {
"achievements": {
"tank_expert_uk": 0,
{
"status": "ok",
"count": 2,
"data": {
"19213": {
"clan": {
"role_i18n": {
"ru": "заместитель командира",
"fr": "Commandant suppléant",
"en": "Deputy Commander",
{
"status": "ok",
"count": 1,
"data": {
"461": {
"spotted": {
"place": 81659,
"value": 27571
},
"dropped_ctf_points": {
{
"status": "ok",
"count": 1,
"data": {
"1": {
"members_count": 100,
"description": "Закрытый клан, в состав которого входят лишь разработчики игры "World of Tanks".\n\nЗаявки, посланные командиру клана через форум, НЕ РАССМАТРИВАЮТСЯ .",
"description_html": "<p>Закрытый клан, в состав которого входят <i>лишь</i> разработчики игры &quot;World of Tanks&quot;.\n</p><p>\n<br/>Заявки, посланные командиру клана через форум, <i>НЕ РАССМАТРИВАЮТСЯ</i> .\n</p>",
"created_at": 1293024672,
"updated_at": 1375930001,
#!/bin/bash
cd /media/dumps
name=$(date +%b-%d)
year=$(date +%Y)
[ -d $year ] || mkdir $year || { echo "Could not create directory '$year'"; exit 1; }
mongodump --db t3_mage --out $name &> mongodump.log
if [ $? ]; then
tar -czf snapshots/$year/$name.tgz $name
if [ $(($(date +%d | sed 's/^0*//') % 10)) == 0 ]; then
// Basic XMPP bot example for MUC using node.js
// To use:
// 1. Set config variables
// 2. Run `node xmpp_bot.js`
// 3. Send a message like "!weather 94085" in the room with the bot
var request = require('request'); // npm install request
// Basic XMPP bot example for HipChat using node.js
// To use:
// 1. Set config variables
// 2. Run `node hipchat_bot.js`
// 3. Send a message like "!weather 94085" in the room with the bot
var request = require('request'); // github.com/mikeal/request
var sys = require('sys');
var util = require('util');