Skip to content

Instantly share code, notes, and snippets.

View ipl31's full-sized avatar
🎯
Focusing

Ken Caruso ipl31

🎯
Focusing
View GitHub Profile
[21842.711624] INFO: task kvm:8138 blocked for more than 120 seconds.
[21842.719878] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[21842.730157] kvm D ffff8818361e4de0 0 8138 1 0x00000080
[21842.730163] ffff880baa3e1c18 0000000000000086 000000000000001b ffff88187fc93ec0
[21842.730169] ffff880baa3e1fd8 ffff880baa3e1fd8 ffff880baa3e1fd8 0000000000013ec0
[21842.730173] ffff880c3d5aae80 ffff880b6e2a8000 ffff880baa3e1c08 ffff881829d8c918
[21842.730178] Call Trace:
[21842.730191] [<ffffffff816f41c9>] schedule+0x29/0x70
[21842.730238] [<ffffffffa01dca77>] xlog_wait+0x67/0x90 [xfs]
[21842.730245] [<ffffffff81092050>] ? try_to_wake_up+0x200/0x200
class BroDnsParser < Parser
def parse( line )
# Check if this is DNS A record Query:
m = line.split()
if m:
data = {:timestamp => m[0],
:uid => m[1],
:id_orig_h => m[2],
#!/usr/bin/python
#
# ALBERT EINSTEIN'S RIDDLE
#
# ARE YOU IN THE TOP 2% OF INTELLIGENT PEOPLE IN THE WORLD?
# SOLVE THE RIDDLE AND FIND OUT.
#
# There are no tricks, just pure logic, so good luck and don't give up.
#
# 1. In a street there are five houses, painted five different colours.
@ipl31
ipl31 / gist:5184505
Created March 18, 2013 01:58
get cik from ticker
import urllib2
import time
ticker = 'BAC'
string_match = 'rel="alternate"'
url = 'http://www.sec.gov/cgi-bin/browse-edgar?company=&match=&CIK=%s&owner=exclude&Find=Find+Companies&action=getcompany' % ticker
response = urllib2.urlopen(url)
for line in response:
if string_match in line:
for element in line.split(';'):
@ipl31
ipl31 / kvEventProfiler2.py
Created November 19, 2012 05:23
kvEventProfiler2 - Playing around with the event profiler class
# (c) 2011, 2012 Georgia Tech Research Corporation
# This source code is released under the New BSD license. Please see
# http://wiki.quantsoftware.org/index.php?title=QSTK_License
# for license details.
#
# Created on October <day>,2011
# @author: Vishal Shekhar, Tucker Balch
# @contact: mailvishalshekhar@gmail.com
# @summary: Event Profiler Application
#
@ipl31
ipl31 / kvEventProfiler2.py
Created November 19, 2012 05:16
Tweaked karl's eventprofiler hacks
# (c) 2011, 2012 Georgia Tech Research Corporation
# This source code is released under the New BSD license. Please see
# http://wiki.quantsoftware.org/index.php?title=QSTK_License
# for license details.
#
# Created on October <day>,2011
# @author: Vishal Shekhar, Tucker Balch
# @contact: mailvishalshekhar@gmail.com
# @summary: Event Profiler Application
#
@ipl31
ipl31 / improved_tutorial.py
Created November 19, 2012 05:11
Improved Tutorial 9 to be a little more pythonic and also track tickers with matched events
'''
(c) 2011, 2012 Georgia Tech Research Corporation
This source code is released under the New BSD license. Please see
http://wiki.quantsoftware.org/index.php?title=QSTK_License
for license details.
Created on March, 5, 2012
@author: Sourabh Bajaj
@contact: sourabhbajaj90@gmail.com
@ipl31
ipl31 / poc.py
Created November 5, 2012 19:42
poc.py
#!/usr/bin/env python
import netaddr
from fabric import api
from fabric.network import disconnect_all
USER = "ubuntu"
PASS = "ubuntu"
NETWORK = "172.16.0.0/12"
CMD = "uptime"
[10828.903050] XFS: Internal error XFS_WANT_CORRUPTED_GOTO at line 1508 of file /build/buildd/linux-3.0.0/fs/xfs/xfs_alloc.c. Caller 0xffffffffa02cd137
[10828.903053]
[10828.903164] Pid: 5374, comm: nova-compute Tainted: G C 3.0.0-12-generic #20-Ubuntu
[10828.903167] Call Trace:
[10828.903198] [<ffffffffa02f61af>] xfs_error_report+0x3f/0x50 [xfs]
[10828.903212] [<ffffffffa02cd137>] ? xfs_free_extent+0xd7/0x120 [xfs]
[10828.903225] [<ffffffffa02cab28>] xfs_free_ag_extent+0x528/0x730 [xfs]
[10828.903238] [<ffffffffa02cd137>] xfs_free_extent+0xd7/0x120 [xfs]
[10828.903252] [<ffffffffa02dd084>] xfs_bmap_finish+0x164/0x1b0 [xfs]
[10828.903269] [<ffffffffa02fd399>] xfs_itruncate_finish+0x159/0x3a0 [xfs]
@ipl31
ipl31 / install-graphite-ubuntu-11.10.sh
Created February 6, 2012 23:39
Install Graphite 0.9.9 on Ubuntu 11.10
####################################
# BASIC REQUIREMENTS
# http://graphite.wikidot.com/installation
# Forked from: http://geek.michaelgrace.org/2011/09/how-to-install-graphite-on-ubuntu/
# Ubuntu 11.10 Oneiric Ocelot
# Last tested & updated 10/14/2011
####################################
sudo apt-get update
sudo apt-get dist-upgrade