Skip to content

Instantly share code, notes, and snippets.

@dctrwatson
dctrwatson / update_integration_test_apps.py
Created August 7, 2013 02:56
Update jenkins matrix build with config per python app
import os
import re
import urllib
from lxml import etree
JENKINS_CONIG_URL = 'http://jenkins.local/job/integration-tests/config.xml'
BLACKLIST = set(('tests/integration/app1', 'tests/integration/app2', ))
def remove_root_from(path):
@dctrwatson
dctrwatson / OpenSSL 0.9.8x
Created July 31, 2013 08:45
Difference between OpenSSL versions System Version: OS X 10.8.4 (12E55) Kernel Version: Darwin 12.4.0 Model Name: MacBook Pro Model Identifier: MacBookPro10,2 Processor Name: Intel Core i7 Processor Speed: 2.9 GHz Number of Processors: 1 Total Number of Cores: 2 L2 Cache (per Core): 256 KB L3 Cache: 4 MB Memory: 8 GB
OpenSSL 0.9.8x 10 May 2012
built on: Apr 27 2013
options:bn(64,64) md2(int) rc4(ptr,char) des(idx,cisc,16,int) aes(partial) blowfish(ptr2)
compiler: -arch x86_64 -fmessage-length=0 -pipe -Wno-trigraphs -fpascal-strings -fasm-blocks -O3 -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DL_ENDIAN -DMD32_REG_T=int -DOPENSSL_NO_IDEA -DOPENSSL_PIC -DOPENSSL_THREADS -DZLIB -mmacosx-version-min=10.6
available timing options: TIMEB USE_TOD HZ=100 [sysconf value]
timing function used: getrusage
The 'numbers' are in 1000s of bytes per second processed.
type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes
md5 38143.69k 119545.89k 277327.98k 421224.64k 490718.66k
hmac(md5) 44242.06k 134438.19k 293790.30k 422019.19k 494423.98k
nginx version: nginx/1.2.9
TLS SNI support enabled
configure arguments:
--prefix=/usr/share/nginx
--conf-path=/etc/nginx/nginx.conf
--error-log-path=/var/log/nginx/error.log
--http-client-body-temp-path=/var/lib/nginx/body
--http-fastcgi-temp-path=/var/lib/nginx/fastcgi
--http-log-path=/var/log/nginx/access.log
--http-proxy-temp-path=/var/lib/nginx/proxy
@dctrwatson
dctrwatson / nginx.conf
Last active December 5, 2023 05:07
Caching NPM proxy using Nginx
user www-data;
worker_processes 4;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
@dctrwatson
dctrwatson / nginx.conf
Last active March 19, 2023 08:56
Caching PyPi packages locally with nginx
user www-data;
worker_processes 4;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
@dctrwatson
dctrwatson / nginx.conf
Last active December 16, 2015 04:08
Caching Nginx Conf for Phabricator
user www-data;
worker_processes 4;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
@dctrwatson
dctrwatson / graphite.wsgi
Last active December 15, 2015 18:39
Adding raven to graphite-web
import os
os.environ['DJANGO_SETTINGS_MODULE'] = 'graphite.settings'
from raven.contrib.django.raven_compat.middleware.wsgi import Sentry
from django.core.handlers.wsgi import WSGIHandler
application = Sentry(WSGIHandler())
@dctrwatson
dctrwatson / info.pp
Created February 13, 2013 22:47
Has to be better way of gathering all names of a certain defined resources in Puppet
class info {
define iota() {}
Info::Iota<| |>
$info_template = '<% scope.compiler.catalog.vertices.each do |resource| -%>
<%- if resource.type == "Info::Iota" -%><%= resource.name %>,<% end -%>
<%- end -%>'
$all_iotas = unique(sort(split(chop(inline_template($info_template)),',')))
@dctrwatson
dctrwatson / JenkinsDiffEventListener.php
Last active January 11, 2020 22:56
Jenkins Phabricator Inegration
<?php
/*
* Copyright 2013 Disqus, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
@dctrwatson
dctrwatson / commit_diff.sh
Last active April 9, 2024 20:50
Update Phabricator diff depending on build status
BASE_COMMIT=$(echo {\"diff_id\": ${DIFF_ID}} | arc call-conduit differential.getdiff | awk -v RS=',' -v FS=':' '$1~/\"sourceControlBaseRevision\"/ {print $2}' | tr -d \")
# Update repo (can be taken care of by jenkins too)
git fetch --all
git remote prune origin
# We only want to test the diff so reset to base
git reset --hard ${BASE_COMMIT}
git clean -fdx