This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
INTERFACE="eth0" | |
case $1 in | |
config) | |
echo "graph_title $INTERFACE rx traffic" | |
echo 'graph_args --base 1000' | |
echo 'graph_category network' | |
echo 'traffic.label rx' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import os, glob | |
from io import BytesIO | |
class End(Exception): pass | |
def decode(stream): | |
delim = stream.read(1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import io | |
import base64 | |
import struct | |
import hashlib | |
import asyncio | |
import websockets | |
from enum import Enum | |
# ground control to major type |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The MIT License | |
# SPDX short identifier: MIT | |
# Further resources on the MIT License | |
# Copyright 2017 Denis Gladkikh (https://www.outcoldman.com/en/archive/2017/07/19/dbhist/) | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import csv | |
from itertools import groupby | |
from collections import Counter | |
reader = csv.DictReader(open('MLB.CWEVENTS')) | |
writer = csv.writer(open('sequences.csv', 'wb')) | |
it = groupby(reader, key=lambda row: row['GAME_ID']) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Download memcached source | |
./configure --enable-sasl --enable-sasl-pwdb | |
make | |
echo "user:password" > memcached-sasl-pwdb | |
export MEMCACHED_SASL_PWDB=memcached-sasl-pwdb | |
./memcached -S -vv | |
Don't need anything with sasl, saslpasswd2, or memcached.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<opml version="2.0"> | |
<head> | |
<title>Feeds for Journalists</title> | |
<dateCreated>2018-01-15T20:13:26Z</dateCreated> | |
<docs>https://github.com/edavis/feedsForJournalists</docs> | |
<ownerId>https://github.com/edavis</ownerId> | |
</head> | |
<body> | |
<outline type="rss" xmlUrl="http://beta.thehindu.com/news/?service=rss"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
var _gaq = _gaq || []; | |
_gaq.push(['_setAccount', 'UA-6492871-3']); | |
_gaq.push(['_trackPageview']); | |
(function() { | |
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; | |
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; | |
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); |
NewerOlder