Skip to content

Instantly share code, notes, and snippets.

# -*- coding: utf-8 -*-
from geventirc import Client, handlers, message
NICK = "uwsgibaught"
HOST = "irc.onion.com"
PORT = 6667
CHANNELS = (u"#💩💨💨",)
PASSWORD = "th3on1on2013"
irc = Client(HOST, NICK, port=PORT)
24d23
< <<<<<<< HEAD
26,76d24
< =======
< body { background-color: #F1F1F1 }
<
< #footer { text-align: center }
<
< #results {
<
@csinchok
csinchok / bash_profile
Last active July 8, 2022 17:29
Make a disposable python virtualenv
function throwaway {
THROWAWAY_DIR=$(mktemp -d -t virtualenv);
cd $THROWAWAY_DIR;
virtualenv .;
source bin/activate;
trap "rm -r $THROWAWAY_DIR" EXIT
}
export -f throwaway

MBOs

Quarterly

  1. Piece together a server monitoring tool.
  2. Build a new, ansible-driven deploy process.
  3. Open-source and properly version all of our shared code.

Yearly

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Encoding...</title>
<style>
body {
margin: 0;
padding: 0;
background-color: #333;
<html><head><meta http-equiv="refresh" content="0; URL='http://73972.api-04.com/serve?action=click&amp;publisher_id=73972&amp;site_id=54804&amp;offer_id=289864&amp;ref_id=206773_53b70cee9990b_14070422&amp;mac_address=&amp;odin=&amp;ios_ifa=&amp;sub_publisher=206773&amp;sub_site=106933&amp;sub_campaign=2156&amp;sub_adgroup=5683&amp;sub_ad='"></head><body></body></html>
@csinchok
csinchok / .profile
Created September 8, 2014 21:56
Just a cool script
function throwaway {
THROWAWAY_DIR=$(mktemp -d -t virtualenv);
cd $THROWAWAY_DIR;
virtualenv .;
source bin/activate;
trap "rm -r $THROWAWAY_DIR" EXIT
}
export -f throwaway
@csinchok
csinchok / clear_logstash_data.sh
Created October 2, 2014 19:15
Clear kibana indices older than 20 days
#!/bin/bash
curl http://127.0.0.1:9200/_aliases 2>/dev/null | \
python -c "import json;import sys;sys.stdout.write('\n'.join([key for key in json.load(sys.stdin).keys() if key.startswith('logstash')]))" | \
sort -r | tail -n +20 | xargs -L 1 -I {} curl -XDELETE http://127.0.0.1:9200/{}/
@csinchok
csinchok / zylch.py
Created October 13, 2014 15:42
zylch.py
def application(env, start_response):
start_response("200 OK", [("Content-Type", "text/html")])
return """<!doctype html>
<html>
<title>Welcome to zylch!</title>
<body>
</body>
</html>"""
#!/bin/sh
wget -O /tmp/onion-devel.sql.bz2 http://192.168.1.26/onion/onion.sql.bz2
export PGPASSWORD=testonion
psql -d postgres -h 127.0.0.1 -U onion -c "DROP DATABASE onion"
psql -d postgres -h 127.0.0.1 -U onion -c "CREATE DATABASE onion"
bunzip2 /tmp/onion-devel.sql.bz2