Skip to content

Instantly share code, notes, and snippets.

@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>
@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 / 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: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: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%
## 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.