Skip to content

Instantly share code, notes, and snippets.

Jacob Hoffman-Andrews jsha

Block or report user

Report or block jsha

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:ed24408932888ef7ea63ed137fb94238
Traceback (most recent call last):
File "/usr/lib/python2.7/logging/handlers.py", line 76, in emit
if self.shouldRollover(record):
File "/usr/lib/python2.7/logging/handlers.py", line 154, in shouldRollover
self.stream = self._open()
File "/usr/lib/python2.7/logging/__init__.py", line 943, in _open
stream = open(self.baseFilename, self.mode)
IOError: [Errno 2] No such file or directory: '/tmp/tmpqMQlpx/logs/letsencrypt.log'
View trace_gc.log
[30346:0x2950a00] 35606383 ms: Scavenge 1500.2 (1610.1) -> 1485.7 (1610.1) MB, 84.0 / 2.8 ms allocation failure
[30346:0x2950a00] 35607128 ms: Scavenge 1502.4 (1610.1) -> 1490.5 (1610.1) MB, 188.9 / 3.1 ms allocation failure
[30346:0x2950a00] 35607844 ms: Scavenge 1503.8 (1610.1) -> 1494.3 (1610.1) MB, 198.0 / 3.1 ms allocation failure
[30346:0x2950a00] 35608383 ms: Scavenge 1509.1 (1610.1) -> 1501.0 (1610.1) MB, 205.4 / 3.0 ms allocation failure
[30346:0x2950a00] 35608811 ms: Scavenge 1511.8 (1610.1) -> 1503.8 (1612.1) MB, 212.4 / 11.7 ms allocation failure
[30346:0x2950a00] 35609152 ms: Scavenge 1516.9 (1612.1) -> 1505.1 (1614.6) MB, 188.9 / 11.4 ms allocation failure
[30346:0x2950a00] 35609516 ms: Scavenge 1519.4 (1614.6) -> 1506.9 (1616.1) MB, 206.5 / 26.6 ms allocation failure
[30346:0x2950a00] 35615217 ms: Mark-sweep 1520.8 (1616.1) -> 1484.7 (1609.3) MB, 5536.9 / 26.8 ms allocation failure scavenge might not succeed
[30346:0x2950a00] 35616097 ms: Scavenge 1499.5 (1609.3) -> 1485.3 (1609.
@jsha
jsha / gist:8bcbdc53620308968a43738e62bd7dd8
Last active Jan 16, 2017
letsencrypt logs from certbot on jessie
View gist:8bcbdc53620308968a43738e62bd7dd8
# ls /var/log/letsencrypt/ -ltr
total 104
-rw-r--r-- 1 root root 0 Jan 14 00:51 letsencrypt.log.13
-rw-r--r-- 1 root root 2322 Jan 14 00:51 letsencrypt.log.12
-rw-r--r-- 1 root root 756 Jan 14 00:51 letsencrypt.log.11
-rw-r--r-- 1 root root 779 Jan 14 00:52 letsencrypt.log.10
-rw-r--r-- 1 root root 873 Jan 14 00:52 letsencrypt.log.9
-rw-r--r-- 1 root root 795 Jan 14 00:52 letsencrypt.log.8
-rw-r--r-- 1 root root 2345 Jan 14 00:52 letsencrypt.log.7
-rw-r--r-- 1 root root 2345 Jan 14 00:52 letsencrypt.log.6
View fetchtest.go
package main
import (
"bufio"
"flag"
"fmt"
"net/http"
"os"
"sync"
)
View .screenrc
# ~/.screenrc
# Jacob Hoffman-Andrews
# 1998-08-10
# ensure bash is started rather than what's in /etc/passwd
shell -bash
# use fun messages
nethack on
View rootpem
-----BEGIN CERTIFICATE-----
MIIDDTCCAfWgAwIBAgIJAOcb3mHCoKrJMA0GCSqGSIb3DQEBCwUAMCQxIjAgBgNV
BAMMGWN5YmVyIGN5YmVyIGN5YmVyIGZha2UgQ0EwHhcNMTYwMzAyMDY1OTU1WhcN
MjEwMzAxMDY1OTU1WjAkMSIwIAYDVQQDDBljeWJlciBjeWJlciBjeWJlciBmYWtl
IENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA4A08e059jeIEt24g
xweZGZ4R4hL2Ut4XK2icjG5UXaqfrvplprPrFZ53dsw1+xNUG9eXhAeeBTdn6v6B
59UrGqhFmXGCWTIQr4/smYZ3zlOwl/9/4wXfVgOIlbOj0r9nIsvE/tU6rd+A5J9K
gs2+7qO2xZpDJiSAZa2GZB9ssJHT7RwsdUgMw1bVCjkBHZfOVfcO5908JsH533fY
F1kM8t5TPccMaVRBlhaWUJUG6F0KKNN09Zl6RtsQh6ZCtuxvgLJ3AtX9VmfP4m5z
ybLjdSzyKUWZHGbed7PeCs7mjI11VQQSvIcveOuWiW+mRW2DK3A334dR8FJanr8f
@jsha
jsha / mysql-count-value.py
Last active Jan 31, 2016
Python script to count occurrences of a field value in MySQL
View mysql-count-value.py
#!/usr/bin/env python
#
# Using MySQL's grouping and counting features for very large tables is
# very slow. This Python script makes it much faster to count unique
# values of a given column. It selects the column values in reasonably-sized
# chunks (10k rows), and feeds those values into a collections.Counter.
#
# Assumptions: you have a .my.cnf set up to connect to the right DB with the
# right username and password. Your table has an id field, which is numeric and
# ideally autoincrement (for smooth distribution of values).
View flaky-integration-log-2
2015/09/08 19:46:18 [s<][SA.server][RA->SA.testing-worker-linux-docker-79d0ac90-3204-linux-3] received UpdatePendingAuthorization(eyJpZCI6InpQTk9uT2NMNWk1N0FhRzZjOHYxaFdwTmF6cWt2OWJPUGJwbGxiZTBVelkiLCJpZGVudGlmaWVyIjp7InR5cGUiOiJkbnMiLCJ2YWx1ZSI6ImxlLnd0ZiJ9LCJyZWdJZCI6Miwic3RhdHVzIjoicGVuZGluZyIsImNoYWxsZW5nZXMiOlt7InR5cGUiOiJzaW1wbGVIdHRwIiwic3RhdHVzIjoicGVuZGluZyIsInVyaSI6Imh0dHA6Ly9sb2NhbGhvc3Q6NDAwMC9hY21lL2F1dGh6L3pQTk9uT2NMNWk1N0FhRzZjOHYxaFdwTmF6cWt2OWJPUGJwbGxiZTBVelk_Y2hhbGxlbmdlPTAiLCJ0b2tlbiI6Ikh5anQySVRpMGlaYXhwY2g5eVJFbWxFamp0Mk5fN2RDaUVlWk9Iem1wTEEiLCJ0bHMiOnRydWUsImFjY291bnRLZXkiOnsia3R5IjoiUlNBIiwibiI6Im1rdGZpNHNaMTdLeFVTX2JtU0hPendZRFVyc20yOUl3d1VBVmxvN2I3VUZtaUlDbGVaNFphTW5YM0FKYTRvbnhxY0lMbkZReFVpMkh6TG1RUHNYT1QyamdMcXNQUko1UnNQNGlMY1ZHMFpTdVhkc3hKVTRzVWpRdWFqSmR3RUUwa0pCVENBYzV5U2ItYXNwYTNRTV9yUU9FZDZ5MmR6dnFyc25MNmZpeXhWWlMwdDR4MlNGMUoxbW5Sc2lLaW5FQlBwNWxUTXpRVHkzYlRRVVFwclI4djE5emlVQWx5WlpoTWlrVTM3VGdXLUVMMkVKcEZfSTVsOWtIakNQVzB3aUVCUHU4eFBBa2tjN3U3TE5JMGQxZjluX21USVJJbjZaRERZeFotRzFyN
View flaky-integration-error-log.txt
2015/09/08 15:32:33 [c>][WFE->SA.testing-worker-linux-docker-18d3aff1-3221-linux-8] requesting GetRegistrationByKey(eyJrdHkiOiJSU0EiLCJuIjoiMXR3WF8zMkJNWG9ueW5KQm9sUld4VEJnRFJiRVcxMEZpQkJzR1N0TWEyTzVNV0NuLXFvVmktY3JJcW5OXzgxNXhSWHI0RUtHV21QQmNibDRRZ2ZZaXRKQ3YyVEgtM2czMnV4UzBoUVRBaHdvMEZkbDRFd3ZUMjVXLVJ0QTFCMjVhVFZkcTFQeGxPc1lfVVR4ZVUxQXNmYkxlZVNvUzN1QnhuelBENlQ3aFZ0cDNyNGduOXBCczF3R0pmVGlvQVQ1cjFWQ19LZHh5OFpPLVBsSG9sbVhnZXRNY2NxMEFmY3dHV1M5bVhmdWczY0VPZ3N0aWdMUHh6dms3Y0hYRUxkcUMtQUEzYy00NFBYSU5scXlZSGtkQ3luaVlKSGQxS2ljNmd6cDdZMmszcnFfRkVaeUpJbWctWHZHb1RiQlVLSVd3U2tPSFFvSzlmY29ZU2dNQ0lkbzN3IiwiZSI6IkFRQUIifQ) [0y6JOh5V4VhPNA0VvvuAbrKGLnN4xCmvJIMS3vZmDKE]
2015/09/08 15:32:33 [s<][SA.server][WFE->SA.testing-worker-linux-docker-18d3aff1-3221-linux-8] received GetRegistrationByKey(eyJrdHkiOiJSU0EiLCJuIjoiMXR3WF8zMkJNWG9ueW5KQm9sUld4VEJnRFJiRVcxMEZpQkJzR1N0TWEyTzVNV0NuLXFvVmktY3JJcW5OXzgxNXhSWHI0RUtHV21QQmNibDRRZ2ZZaXRKQ3YyVEgtM2czMnV4UzBoUVRBaHdvMEZkbDRFd3ZUMjVXLVJ0QTFCMjVhVFZkcTFQeGxPc1lfVVR4ZVUxQXNmYkxlZVNvUzN
View gist:22a303abe259fe434f18
mysql> show indexes from challenges;
+------------+------------+-----------------+--------------+-----------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment |
+------------+------------+-----------------+--------------+-----------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| challenges | 0 | PRIMARY | 1 | id | A | 75 | NULL | NULL | | BTREE | | |
| challenges | 1 | authorizationid | 1 | authorizationID | A | 75 | NULL | NULL | | BTREE | | |
+------------+------------+-----------------+--------------+-----------------+-----------+-------------+----------+--------+------+-
You can’t perform that action at this time.