Skip to content

Instantly share code, notes, and snippets.

View ehelaya's full-sized avatar

UdayangaS ehelaya

View GitHub Profile
@ehelaya
ehelaya / aggregator
Created May 3, 2023 05:10
aggregator
% aggregator_stats_sup:find_stats_proc(TenantId, ClusterId, StatsId, Type).
{ok, Pid} = aggregator_stats_sup:find_stats_proc(<<"0002">>, <<"65">>, <<"4bT0GyIA5tFnAbZ2tpLqLT">>, <<"queue">>).
AggStats = aggregator_stats_process:get_stats(Pid).
file:write_file("/tmp/agg_stats.txt", io_lib:fwrite("~p", [AggStats])).
@ehelaya
ehelaya / nginx_basics.md
Created November 30, 2017 11:54 — forked from leommoore/nginx_basics.md
Nginx Basics

#Nginx Basics for Ubuntu

Please see http://wiki.nginx.org/Main for more information. See http://arstechnica.com/gadgets/2012/11/how-to-set-up-a-safe-and-secure-web-server/ for a tutorial on how to install Nginx.

##Installation To install, you can install the version which is in the standard Ubuntu repositories but it is normally quite old and will not have the latest security patches. The best way is to update the repositories first:

apt-get update
apt-get install python-software-properties

apt-get upgrade

@ehelaya
ehelaya / multi-git.md
Created January 3, 2017 00:22 — forked from rosswd/multi-git-win.md
Setting up a Github and Bitbucket account on the same computer.

Setting up github and bitbucket on the same computer

Github will be the main account and bitbucket the secondary.

Create SSH Keys

ssh-keygen -t rsa -C "github email"

Enter passphrase when prompted. If you see an option to save the passphrase in your keychain, do it for an easier life.