Skip to content

Instantly share code, notes, and snippets.

## Name of the riak node
-name riak@XX.XXX.XX.XXX
## Cookie for distributed erlang. All nodes in the same cluster
## should use the same cookie or they will not be able to communicate.
-setcookie riak
## Heartbeat management; auto-restarts VM if it dies or becomes unresponsive
## (Disabled by default..use with caution!)
##-heart
%% -*- tab-width: 4;erlang-indent-level: 4;indent-tabs-mode: nil -*-
%% ex: ts=4 sw=4 et
[
%% Riak Core config
{riak_core, [
%% Default location of ringstate
{ring_state_dir, "/var/lib/riak/ring"},
%% http is a list of IP addresses and TCP ports that the Riak
%% HTTP interface will bind.
@anativ
anativ / gist:1466305
Created December 12, 2011 09:55
Mongo Error
Mon Dec 12 09:41:26 [initandlisten] connection accepted from XXX.XXX.X.X:14488 #8
Mon Dec 12 09:41:27 [conn8] CMD: drop hermescp_dev.tmp.mr.mapreduce_1323682887_1
Mon Dec 12 09:41:27 [conn8] CMD: drop hermescp_dev.tmp.mr.mapreduce_1323682887_1_inc
69900/1472167 4%
Mon Dec 12 09:41:32 allocating new datafile /mnt/mongo/data/db/hermescp_dev.3, filling with zeroes...
160900/1472167 10%
Mon Dec 12 09:41:33 done allocating datafile /mnt/mongo/data/db/hermescp_dev.3, size: 512MB, took 1.82 secs
251900/1472167 17%
Mon Dec 12 09:41:36 [initandlisten] connection accepted from XXX.XXX.X.X:14889 #9
343200/1472167 23%
@anativ
anativ / gist:2283953
Created April 2, 2012 14:42
gem files
source 'https://rubygems.org'
gem 'rails', '3.2.1'
gem 'nokogiri' , '1.5.2'
gem 'json'
# Gems used only for assets and not required
# in production environments by default.
group :assets do
@anativ
anativ / gist:2580788
Created May 2, 2012 21:49
99 Design Exception
exception 'Gazelle_Db_ConnectionPoolException' with message 'All connections for role 'writer' in connection pool 'db' failed, last failure was: mysqlt error: [1040: Too many connections] in CONNECT(production.cx2epq7umvoj.us-east-1.rds.amazonaws.com, 'contests', '****', contests)
' in /usr/local/contests-origin/production/classes/Gazelle/Db/ConnectionPool.php:102
Stack trace:
#0 /usr/local/contests-origin/production/classes/Gazelle/Db/LoadBalancedDatabase.php(144): Gazelle_Db_ConnectionPool->getConnection('writer')
#1 /usr/local/contests-origin/production/classes/Gazelle/Db/LoadBalancedDatabase.php(359): Gazelle_Db_LoadBalancedDatabase->_getConnection('writer')
#2 /usr/local/contests-origin/production/classes/Gazelle/Db/LoadBalancedDatabase.php(506): Gazelle_Db_LoadBalancedDatabase->_getWriter()
#3 /usr/local/contests-origin/production/classes/Edge/Session/SessionHandler.php(145): Gazelle_Db_LoadBalancedDatabase->Execute('REPLACE INTO `s...', Array)
#4 /usr/local/contests-origin/production/classes/Edge/Sess
@anativ
anativ / gist:2907134
Created June 10, 2012 19:56
Search Facebook Friends with jQuery
<script>
$(function() {
$( "#autocomplete-input" ).autocomplete({
source: function( request, response ) {
$.ajax({
url: "https://graph.facebook.com/me/friends?access_token=AAAAAAITEghMBAMDBQ94HP7mX7JoDeCS6JVhN19bC4mXSvGdAglokKNC2hUYcc1uOHTZBXtWvxhxIYU7ZCVCXKxnw46nISYSFfTO26QRQZDZD&callback=?",
dataType: "jsonp",
data: {
featureClass: "P",
style: "full",
@anativ
anativ / log.txt
Last active March 13, 2016 13:00
Chat-API debug log
rx <notification from="13xxxxxxxxxx7@s.whatsapp.net" type="contacts" id="3121717501" t="1457873569">
rx <update jid="13xxxxxxxxxx7@s.whatsapp.net"></update>
rx </notification>
tx <ack to="13xxxxxxxxxx7@s.whatsapp.net" class="notification" id="3121717501" type="contacts"></ack>
rx <notification from="13xxxxxxxxxx7-1457873586@g.us" type="w:gp2" id="2011413615" participant="13xxxxxxxxxx7@s.whatsapp.net" notify="Mike" t="1457873586">
rx <create type="new" key="13xxxxxxxxxx7-1457873586@g.us">
rx <group id="13xxxxxxxxxx7-1457873586" creator="13xxxxxxxxxx7@s.whatsapp.net" creation="1457873586" subject="Local test" s_t="1457873586" s_o="13xxxxxxxxxx7@s.whatsapp.net">
rx <participant jid="13xxxxxxxxxx7@s.whatsapp.net" type="admin"></participant>
rx <message from="ANDROID_NUMBER-1459167510@g.us" type="text" id="3EB04AD6096919170AA4" participant="iPhoneNumber@s.whatsapp.net" t="1459179597" notify="iPhone USER">
rx <enc v="2" type="skmsg">3308a1e3a1ea0610031ac00113809aef6e0aeb33784ed4fd76f63a3c6ad400956849435f79bf616d59021f8bccbf547332010c0459395fcfc689750d889545cc7d65d805ab5e0e41cec203e69c00264d9c85c1de9da71ce2d5a56f8eadc56caeba0da8be5ac703d439de7d0718b46d3ae1f97a1113397285b1840da3dff5e5c8a77e0308eb0cac53b1b088432e6a8bd87963f5bb446b1253b764a593f1cef0c11bcebe490b7b15d9926ce6d9e33e7b32ea1e40f279085ca89c593e50d48237c7b7ab088cf4cbc208f9363416d944931acb827694bb37ea09b458af8affd384a9a9685e8a7553aeffa53b93d896ad2aa31e35a55685afde3e74d4fce6975a6a40cfcb4b5fdd3a4f6696c44884</enc>
rx </message>
tx <ack to="ANDROID_NUMBER-1459167510@g.us" class="message" id="3EB04AD6096919170AA4" t="1459179597"></ack>
-> Decrypted Message: No keys for: 1833464225 - /code/WhatsApp-Api/src/libaxolotl-php/groups/state/SenderKeyRecord.php - 40tx <receipt id="3EB04AD609691917
tx <stream:features></stream:features>
tx <auth user="MyNumber" mechanism="WAUTH-2">691ee1fb393732353539383736393238f0f845cdf9c7ad4c0dc6f0a6874e7abff449394531343539313931363432</auth>
rx <from s.whatsapp.net=""></from>
rx <stream:features></stream:features>
rx <challenge>b3c493ace859b3760813102377c1bbec76951227</challenge>
tx <stream:features></stream:features>
tx <auth user="MyNumber" mechanism="WAUTH-2">c75d6fd0393732353539383736393238ce162cf563ef74afc84810d9ce39682e9840adcd31343539313931373239</auth>
rx <from s.whatsapp.net=""></from>
rx <stream:features></stream:features>
rx <challenge>c36441d546e905574b8b77dae92628f856029d2b</challenge>