Skip to content

Instantly share code, notes, and snippets.

View wlonkly's full-sized avatar

Rich Lafferty wlonkly

View GitHub Profile
@wlonkly
wlonkly / tls.md
Created April 14, 2020 01:36
Fun with TLS

IO::Socket::SSL defaults:

    SSL_cipher_list => join(" ",
        qw(
            ECDHE-ECDSA-AES128-GCM-SHA256
            ECDHE-ECDSA-AES128-SHA256
            ECDHE-ECDSA-AES256-GCM-SHA384
            ECDHE-ECDSA-AES256-SHA384
            ECDHE-ECDSA-AES128-SHA
zentab.js:15 993 Zentab: ERROR: TypeError: Cannot read property 'condition' of undefined
widgets.js:129 Uncaught TypeError: Cannot read property 'condition' of undefined
at Widget.weather.buildForecast (widgets.js:129)
at Widget.weather.refresh (widgets.js:165)
at Widget.weather.start (widgets.js:183)
at zentab.js:620
at Array.forEach (<anonymous>)
at zentab.js:618
at Object.$.zentab.getLocal (zentab.js:79)
at Object.$.zentab.loadWidgets (zentab.js:612)
@wlonkly
wlonkly / foo.md
Created June 24, 2020 21:25
Markdown line wrapping annoyance

This is a paragraph composed of separate lines with hard line endings. "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt

@wlonkly
wlonkly / cloudwatch-to-sumo.js
Created August 7, 2020 22:34
SumoLogic cloudwatch-to-sumo lambda function
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// CloudWatch Logs to SumoLogic //
// https://github.com/SumoLogic/sumologic-aws-lambda/tree/master/cloudwatchlogs //
// //
// YOU MUST CREATE A SUMO LOGIC ENDPOINT CALLED SUMO_ENDPOINT AND PASTE IN ENVIRONMENTAL VARIABLES BELOW //
// https://help.sumologic.com/Send_Data/Sources/02Sources_for_Hosted_Collectors/HTTP_Source //
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Include logStream and logGroup as json fields within the message. Required for SumoLogic AWS Lambda App
@wlonkly
wlonkly / excuses.txt
Created April 27, 2021 22:48
BOFH excuse file++
# Includes the BOFH excuse file grabbed from:
# http://www.cs.wisc.edu/~ballard/bofh/excuses
clock speed
solar flares
electromagnetic radiation from satellite debris
static from nylon underwear
static from plastic slide rules
global warming
poor power conditioning
static buildup
@wlonkly
wlonkly / bbc.bas
Last active June 13, 2021 21:33
Code samples from developer.bbc.com's hero image textarea
10 PRINT "BBC Developer Portal"
20 GOTO 10
@wlonkly
wlonkly / debugging.md
Last active July 8, 2021 15:13
Steps I took to troubleshoot a full disk

I wrote this down after I responded to a page today (a holiday) because it would've been a decent pairing opportunity for a couple of new people on my team. Second best is that people can read what I did afterwards and ask me any questions. And then I realized that there's nothing PagerDuty-specific or confidential in here, so I may as well share it wider. It's hardly an epic incident, but it's a good example of "doing the work", I think. I borrowed the "write down what you learned" approach from Julia "b0rk" Evans. It's a fantastic practice.

The PagerDuty incident: "Disk will be full in 12 hours. device:/dev/nvme0n1p1, host:stg-nomadusw2-client-..."

(Note for non-PD readers: We run Nomad where others might run Kubernetes.)

Here's the process I went through.

  • Noticed that the usual docker system prune -a -f didn't resolve it
  • Tried docker system prune -a -f and it cleared up 0B
@wlonkly
wlonkly / gist:b39f8fe37c8455bcc0bce6a7549a62ee
Last active June 19, 2022 18:50
iplist from Dan's Tools "What is my IP?"
10.0.0.1
10.0.0.138
10.0.0.2
10.0.1.1
10.0.10.254
10.1.0.99
10.1.1.1
10.10.10.1
10.10.10.254
10.100.1.1
@wlonkly
wlonkly / tst.css
Created July 21, 2022 02:12
wlonkly's Tree Style Tabs CSS
/* Show title of unread tabs with italic font */
:root.sidebar tab-item.unread .label-content {
font-style: italic !important;
}
/* Add private browsing indicator per tab */
:root.sidebar tab-item.private-browsing tab-label:before {
content: "🕶";
}
@wlonkly
wlonkly / gist:c547f93818b40627e75afcceae6d64a6
Created August 12, 2022 20:09
why wayfair.ca DNS is broken
:) ~$ dig @c.ca-servers.ca wayfair.ca ns
; <<>> DiG 9.10.6 <<>> @c.ca-servers.ca wayfair.ca ns
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 51813
;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 8, ADDITIONAL: 1
;; WARNING: recursion requested but not available