Skip to content

Instantly share code, notes, and snippets.

@mpilar
mpilar / Trace results
Created March 1, 2018 23:20
Problem test
=== RUN TestAccAWSLB_networkLoadbalancer_updateCrossZone
2018/03/01 17:07:46 [INFO] Test: Using us-west-2 as test region
2018/03/01 17:07:46 [INFO] No assume_role block read from configuration
2018/03/01 17:07:46 [INFO] Building AWS region structure
2018/03/01 17:07:46 [INFO] Building AWS auth structure
2018/03/01 17:07:46 [INFO] Setting AWS metadata API timeout to 100ms
2018/03/01 17:07:47 [INFO] Ignoring AWS metadata API endpoint at default location as it doesn't return any instance-id
2018/03/01 17:07:47 [INFO] AWS Auth provider used: "EnvProvider"
2018/03/01 17:07:47 [INFO] Initializing DeviceFarm SDK connection
2018/03/01 17:07:47 [DEBUG] [aws-sdk-go] DEBUG: Request sts/GetCallerIdentity Details:
@mpilar
mpilar / GigyaSignatureValidator.js
Created June 7, 2017 16:22
GigyaSignatureValidator
'use strict'
const crypto = require('crypto');
var calcSignature = (baseString, secretKey) => {
const secretBuffer = new Buffer(secretKey, 'base64');
return crypto.createHmac('sha1', secretBuffer).update(baseString).digest('base64');
};
var verifySignature = (UID, signature, timestamp, secretKey) => {
@mpilar
mpilar / nota.json
Last active May 22, 2017 23:31
Nota Con Video mainAsset
{
"article": {
"id": 2322811,
"section": {
"name": "Noticias",
"identifier": "noticias"
},
"subsection": {
"name": "Locales",
"identifier": "locales"
@mpilar
mpilar / 1.json
Created May 22, 2017 22:36
json nota con video
{
"$id":"1",
"itemId":2322811,
"id":2322811,
"titulo":"Rosselló defiende la decisión de la Policía de no intervenir en la UPR",
"introduccion":"El mandatario dice que respeta la autonomía universitaria",
"pub_date":"05/19/2017 03:06:00 PM",
"mod_date":"05/19/2017 03:06:00 PM",
"hora":"03:06 PM",
"ocultarFecha":"",
@mpilar
mpilar / gzip.txt
Last active May 12, 2017 21:56
Efecto gzip
mpilar@gfrm-web-cache02:~$ ab -n 5000 -H "Accept-Encoding: gzip,deflate" -c 20 http://qa.magacin.com/
This is ApacheBench, Version 2.3 <$Revision: 1528965 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking qa.magacin.com (be patient)
Completed 500 requests
Completed 1000 requests
Completed 1500 requests
@mpilar
mpilar / deliver.vcl
Created May 12, 2017 17:18
X-Cache VCL
sub vcl_deliver {
if (obj.hits > 0) {
set resp.http.X-Cache = "HIT";
} else {
set resp.http.X-Cache = "MISS";
}
}
@mpilar
mpilar / bernier_response.json
Created November 14, 2016 16:13
Google Vision
{
"faceAnnotations": [
{
"boundingPoly": {
"vertices": [
{
"x": 243
},
{
"x": 650
files:
"/etc/nginx/conf.d/000_shop_config.conf":
mode: "000644"
content: |
client_max_body_size 100m;
client_body_buffer_size 128k;
proxy_buffering on;
proxy_buffer_size 128k;
proxy_buffers 4 256k;
@mpilar
mpilar / gist:0d6c9b97697ef0c6586e
Created December 10, 2015 03:08
ph.com dig trace
ubuntu@ip-10-236-164-55:~$ dig +trace www.primerahora.com
; <<>> DiG 9.8.1-P1 <<>> +trace www.primerahora.com
;; global options: +cmd
. 518400 IN NS M.ROOT-SERVERS.NET.
. 518400 IN NS A.ROOT-SERVERS.NET.
. 518400 IN NS B.ROOT-SERVERS.NET.
. 518400 IN NS C.ROOT-SERVERS.NET.
. 518400 IN NS D.ROOT-SERVERS.NET.
. 518400 IN NS E.ROOT-SERVERS.NET.
ubuntu@ip-10-236-164-55:~$ dig +trace www.elnuevodia.com
; <<>> DiG 9.8.1-P1 <<>> +trace www.elnuevodia.com
;; global options: +cmd
. 518400 IN NS A.ROOT-SERVERS.NET.
. 518400 IN NS B.ROOT-SERVERS.NET.
. 518400 IN NS C.ROOT-SERVERS.NET.
. 518400 IN NS D.ROOT-SERVERS.NET.
. 518400 IN NS E.ROOT-SERVERS.NET.
. 518400 IN NS F.ROOT-SERVERS.NET.