This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% -*- coding: utf8 -*- | |
%% Benchmarking code samples. | |
%% Each benchmark is launched in it's own process to eliminate GC influence. | |
-module(benchmark). | |
-export([main/0]). | |
main() -> | |
% {Test name, TestFun1, TestFun2, Constructor} | |
% Constructor runtime isn't counted |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user_token | username | user_email | user_phone | role_token | stime | etime | |
---|---|---|---|---|---|---|---|
3dd92bb0-8b35-496d-b971-a2c0b9db4bc5 | david | [email protected] | +17142532851 | 3dd92bb0-8b35-496d-b971-a2c0b9db4bc5 | 2017-09-19T20:55:38Z | 2017-09-19T20:55:38Z |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IPPUDO NYC Sale $85.00 | |
RUSSIA HOUSE Sale $250.00 | |
SLEEP NO MORE Sale $468.00 | |
Founding Farmers DC Sale $95.00 | |
PRESS LIQUORS Sale $80.01 | |
DONBURI Sale $81.25 | |
AIRBNB * HMREWFS8BW Sale $678.00 (do i have 2 airbnb accounts?) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- show running queries (pre 9.2) | |
SELECT procpid, age(query_start, clock_timestamp()), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(query_start, clock_timestamp()), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl "https://api.airtable.com/v0/appoAiBETQwaHoz04/creditcards?maxRecords=3&view=Grid%20view" \ | |
-H "Authorization: Bearer keybVVN1Q7Zd7qvhE" | python -m json.tool | |
% Total % Received % Xferd Average Speed Time Time Time Current | |
Dload Upload Total Spent Left Speed | |
100 6700 100 6700 0 0 12175 0 --:--:-- --:--:-- --:--:-- 12181 | |
{ | |
"records": [ | |
{ | |
"createdTime": "2017-08-30T05:03:45.000Z", | |
"fields": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A CA file has been bootstrapped using certificates from the SystemRoots | |
keychain. To add additional certificates (e.g. the certificates added in | |
the System keychain), place .pem files in | |
/usr/local/etc/openssl/certs | |
and run | |
/usr/local/opt/openssl/bin/c_rehash | |
This formula is keg-only, which means it was not symlinked into /usr/local. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# LVDB - LLOOGG Memory DB | |
# Copyriht (C) 2009 Salvatore Sanfilippo <[email protected]> | |
# All Rights Reserved | |
# TODO | |
# - cron with cleanup of timedout clients, automatic dump | |
# - the dump should use array startsearch to write it line by line | |
# and may just use gets to read element by element and load the whole state. | |
# - 'help','stopserver','saveandstopserver','save','load','reset','keys' commands. | |
# - ttl with milliseconds resolution 'ttl a 1000'. Check ttl in dump! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lists:sort(fun({_, X}, {_, Y}) -> X > Y end, | |
dict:to_list(lists:foldl( | |
fun(Pid, Dict) -> | |
InitialCall = case erlang:process_info(Pid, initial_call) of | |
{initial_call,{proc_lib,init_p,A}} -> | |
case erlang:process_info(Pid, dictionary) of | |
{dictionary, D} -> proplists:get_value('$initial_call', D, undefined); | |
_ -> {proc_lib,init_p,A} | |
end; | |
{initial_call,{erlang,apply,A}} -> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lists:sort(fun({_, X}, {_, Y}) -> X > Y end, | |
dict:to_list(lists:foldl( | |
fun(Pid, Dict) -> | |
InitialCall = case erlang:process_info(Pid, initial_call) of | |
{initial_call,{proc_lib,init_p,A}} -> | |
case erlang:process_info(Pid, dictionary) of | |
{dictionary, D} -> proplists:get_value('$initial_call', D, undefined); | |
_ -> {proc_lib,init_p,A} | |
end; | |
{initial_call,{erlang,apply,A}} -> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://engblog.polyvore.com/2015/03/cassandra-compaction-and-tombstone.html | |
size tiered (need storage space, mixed read, update, delete workloads) vs. | |
level tiered compaction strategy (read heavy workloads, more resource intensive) | |
http://dbwrangler.blogspot.co.id/2012/10/cassandra-working-with-time-to-live-ttl.html | |
about ttl and compaction in cassandra with 3 nodes | |
http://www.sestevez.com/range-tombstones/ | |
range tombstone | |