Skip to content

Instantly share code, notes, and snippets.

Twirrim twirrim

Block or report user

Report or block twirrim

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
twirrim /
Created Feb 6, 2019
Check compression in use
#!/usr/bin/env python
from multiprocessing.dummy import Pool
from collections import defaultdict
import requests
import logging
def uses_compression(domain):
import socket
import ssl
import datetime
from multiprocessing.dummy import Pool as ThreadPool
# Tuples containing host and port
CERTS_TO_CHECK = [("host_one", 443),
("host_two", 25)]
twirrim /
Created Aug 10, 2018
Quick attempt to emit Raspberry Pi throttling state metrics through telegraf
#!/usr/bin/env python3
import re
import socket
from subprocess import check_output
def eval_position(position, status):
if status[position] == 1:
return 1
from PIL import Image
import numpy as np
import numexpr as ne
import time
import numbers
from functools import reduce
import pdb
import timeit
View gist:66bfd2b0705f612f9fa8
#!/usr/bin/env python
import socket
import ssl
import datetime
import smtplib
import argparse
import sys
import logging
View gist:03049569a59082edd619
CPython 2.7:
>>> sys.version_info
sys.version_info(major=2, minor=7, micro=3, releaselevel='final', serial=0)
Jython 2.7.0:
>>> sys.version_info
(2, 7, 0, 'final', 0)
View gist:d3acbd63b6c4a5fd84a5
#!/usr/bin/perl -l
use strict;
use warnings;
use Term::ProgressBar;
use Memoize;
use DB_File;
tie my %cache => 'DB_File','primecache',O_RDWR|O_CREAT, 0666;
memoize 'it_is_prime', SCALAR_CACHE => [HASH => \%cache];
View gist:4afba160b87071446747
$ java -jar ~/Downloads/jython-standalone-2.7-b3.jar
Jython 2.7b3 (default:e81256215fb0, Aug 4 2014, 02:39:51)
[OpenJDK 64-Bit Server VM (Oracle Corporation)] on java1.7.0_65
Type "help", "copyright", "credits" or "license" for more information.
>>> dir(__builtins__)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name '__builtins__' is not defined
$ python
View gist:b2fbb8cbfa2092aea52d
"Version": "2012-10-17",
"Statement": [
View gist:7bfcd5848bcfea9ac486
Cloning submodules
Compiling wrk
CC src/wrk.c
In file included from src/wrk.c:3:0:
src/wrk.h:9:25: fatal error: openssl/ssl.h: No such file or directory
#include <openssl/ssl.h>
You can’t perform that action at this time.