Skip to content

Instantly share code, notes, and snippets.

@jtslear
jtslear / strace-brave
Last active August 18, 2019 22:00
strace of brave during reproduction of https://github.com/brave/brave-browser/issues/4142
This file has been truncated, but you can view the full file.
restart_syscall(<... resuming interrupted poll ...>) = 1
recvmsg(36, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
read(12, "!", 2) = 1
recvmsg(34, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(34, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(36, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=11, events=POLLIN}, {fd=12, events=POLLIN}, {fd=34, events=POLLIN}, {fd=36, events=POLLIN}], 4, 0) = 0 (Timeout)
recvmsg(36, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(34, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(34, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
module "gke-skarbek" {
environment = "${var.environment}"
name = "test"
vpc = "${google_compute_network.skarbek.self_link}"
source = "/home/skarbek/projects/terraform/gke"
ip_cidr_range = "${var.cluster_cidr}"
disable_network_policy = "true"
dns_zone_name = "foo"
kubernetes_version = "1.13.6-gke.13"
project = "${var.project}"
package main
import "fmt"
import "os"
/**
* Auto-generated code below aims at helping you parse
* the standard input according to the problem statement.
* ---
* Hint: You can use the debug stream to print initialTX and initialTY, if Thor seems not follow your orders.
@jtslear
jtslear / quiz-part2.go
Created January 28, 2018 14:40
Part 2 for Quiz Gophercise
package main
import (
"encoding/csv"
"flag"
"fmt"
"os"
"strings"
"time"
)
@jtslear
jtslear / testapp.yml
Created July 26, 2017 13:45
Test App for Kubernetes
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: testapp
spec:
replicas: 1
progressDeadlineSeconds: 100
strategy:
rollingUpdate:
@jtslear
jtslear / enable-udp-rsyslog
Created June 1, 2017 00:01
Enable the UDP listener for the rsyslog service
$ModLoad imudp
$UDPServerRun 514
@jtslear
jtslear / haproxy-log-config
Created May 31, 2017 22:31
Example haproxy logging configuration
global
log 127.0.0.1:514 local0
defaults
mode http
log global
@jtslear
jtslear / loggly-haproxy-log-parsing
Last active June 1, 2017 14:06
loggly - haproxy - log parsing
^([\d+\.]+):(\d+)\s\[(.*)\]\s([^\s]+)\s(\w+)\/([^\s]+)\s([-\d]+)\/([-\d]+)\/([-\d]+)\/([-\d]+)\/([-\d]+)\s([-\d]+)\s(\d+)\s([^\s]+)\s([^\s]+)\s([^\s]+)\s([\d]+)\/([\d]+)\/([\d]+)\/([\d]+)\/([\d]+)\s([\d]+)\/([\d]+)\s\"([^"]+)\"$
@jtslear
jtslear / haproxy-example-configuration
Created May 18, 2017 13:09
Example usage of an ACL to detect a cookie and redirect appropriately
acl root-page-url path /
acl has_syrup req.cook(syrup) -m found
use_backend marketing if !has_syrup root-page-url
default_backend application
@jtslear
jtslear / handler.js
Created November 4, 2016 12:38
AWS Lambda Memory Behavior
'use strict';
var arrayA = [];
var arrayB = [];
module.exports.test = (event, context, callback) => {
var arrayC = [];
var arrayD = [];
arrayA.push("A");