Skip to content

Instantly share code, notes, and snippets.

Norbert Burger nburger

View GitHub Profile
View gist:84355678443db9f3bbb0
Here's a jq + awk one-liner which doesn't assume all records occur on the same date, and writes headers appropriately for each output file:
jq -r '.[]|select(.creditcard)|[.timestamp,.name,.creditcard]|@csv'<data.json | awk -F, '{split($1,a,"[-\" ]");f=a[2]a[3]a[4]".csv";c="(echo name,creditcard;cat -)>>"f;gsub(/"/,"",$2);gsub(/"/,"",$3);print $2","$3|c}'
View gist:8341873
'358727'
'358728'
'1020219'
'1020220'
'285009'
'285017'
'795952'
'795959'
'236809'
'397696'
View gist:5470646
v <- c(2560, 6480, 10220, 12680, 16820, 18100, 19940, 20280, 20460, 21020, 21760, 25980, 26360, 29160, 26620, 25420, 19040, 16080, 7821, 4160, 3060, 2640, 2500, 2420, 3020, 5960, 10980, 10920, 14605, 14590, 15380, 17260, 17480, 17760, 21700, 23580, 26000, 27400, 27800, 25100, 17360, 11240, 7840, 4060, 3000, 2580, 2300, 1660, 2560, 5020, 8220, 9300, 13405, 14380, 14680, 12800, 15300, 16021, 23522, 24540, 24640, 31682, 30780, 25420, 17740, 14100, 7540, 4860, 3080, 2940, 2340, 2200, 3140, 6940, 8540, 10020, 13580, 12980, 14924, 17360, 17460, 20000, 22080, 27580, 28600, 28800, 29180, 24200, 17760, 14160, 8280, 5740, 4800, 3500, 2260, 2740, 3660, 7680, 9800, 12820, 14160, 16640, 14540, 16140, 19700, 21520, 26340, 19240, 23900, 27560, 30100, 25620, 22800, 18125, 14180, 8200, 5240, 3080, 2660, 2240, 4000, 8540, 14860, 20980, 26260, 29800, 27580, 28120, 29480, 28540, 28200, 27120, 28460, 28582, 29140, 28740, 25000, 20500, 12260, 8060, 5340, 3220, 3140, 2980, 4020, 7660, 15540, 19560, 24420, 23160, 25160, 23860, 24940
View gist:5468921
deuspcp131029pcs:Downloads nburger$ curl "http://admin.aspen.turner.com/admin/setThrottle?app=auth&property=cvp&plat=all&value=5"
{
"auth-cvp-all" : "5"
}
deuspcp131029pcs:Downloads nburger$ curl "http://admin.aspen.turner.com/admin/setThrottle?app=cvp&property=cvp&plat=all&value=5"
{
"cvp-cvp-all" : "5"
}
deuspcp131029pcs:Downloads nburger$ curl "http://admin.aspen.turner.com/admin/setThrottle?app=auth&property=cnn&plat=all&value=5"
{
You can’t perform that action at this time.