Skip to content

Instantly share code, notes, and snippets.

bot = igor.Igor()
bot.register_plugin(igor.plugins.commands)
bot.connect('irc.aberwiki.org')
bot.start()
@borntyping
borntyping / 0-install.sh
Last active August 29, 2015 14:00
Installing storyplayer
cat > composer.json <<INPUT
{
"require": {
"datasift/storyplayer": "1.5.0"
}
}
INPUT
sudo aptitude install php5-cli php5-curl
curl -sS https://getcomposer.org/installer | php
@borntyping
borntyping / metatest.md
Last active August 29, 2015 14:00
Metatest

Metatest

A command line tool to manage and execute multiple test runners and development tools in an automated way. It would potentially be able to:

  • Run metatests in parallel
  • Allow for metatests to be repeated with multiple inputs. This should include configuration such as python versions to test against, or a generated list of components a test should be run against.
  • Prioritisation of metatests - metatests can be assigned a priority, and be filtered by it
  • Provide a scriptable, automatable interface
  • Test tagging as a single interface to priority, environments and categorisation
#!/usr/bin/env python3
import argparse
import getpass
import logging
import subprocess
import colorlog
@borntyping
borntyping / python-riemann-client_example.py
Last active August 29, 2015 14:01
Example usage for python-riemann-client
import riemann_client.transport
import riemann_client.client
# Create a transport and client
transport = riemann_client.transport.TCPTransport(host, port)
client = riemann_client.client.QueuedClient(transport)
# Add events to the queue
client.event(service='one', metric_f=1)
client.event(service='two', metric_f=2)
# https://enterprise.github.com/help/articles/using-self-signed-ssl-certificates
openssl genrsa -out rootCA.key 2048
openssl req -x509 -new -nodes -key rootCA.key -days 365 -out rootCA.crt
openssl genrsa -out host.key 2048
openssl req -new -key host.key -out host.csr
openssl x509 -req -in host.csr -CA rootCA.crt -CAkey rootCA.key -CAcreateserial -out host.crt -days 365
openssl rsa -in host.key -out host.nocrypt.key
openssl pkcs8 -topk8 -in host.nocrypt.key -out host.pkcs8.key -nocrypt
[sam@el6:~]$ yum install centos-release-SCL
[sam@el6:~]$ repoquery --requires python27
python27-python
python27-python-jinja2
python27-python-nose
python27-python-setuptools
python27-python-simplejson
python27-python-sphinx
python27-python-sqlalchemy
python27-python-virtualenv
@borntyping
borntyping / run_sleep.sh
Created June 26, 2014 15:45
exec + ulimit example
❯ ./set_ulimit.sh
14569 unlimit: 1024
14569 unlimit: 69
14569 unlimit: 69 (exec)
bower@1.3.8 /usr/local/lib/node_modules/bower
├── is-root@0.1.0
├── junk@0.3.0
├── stringify-object@0.2.1
├── which@1.0.5
├── abbrev@1.0.5
├── chmodr@0.1.0
├── osenv@0.1.0
├── opn@0.1.2
├── archy@0.0.2
>>> [].flatten!
=> nil
>>> [[1], [2]].flatten!
=> [1, 2]
>>> [[1]].flatten!
=> [1]
>>> [[]].flatten!
=> []
>>> [].flatten!
=> nil