Skip to content

Instantly share code, notes, and snippets.

Kevin McCarthy kevin1024

Block or report user

Report or block kevin1024

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@kevin1024
kevin1024 / gist:bf73b7fbfb0236765d2e
Last active Aug 29, 2015
saigon noodle house soundtrack
View gist:bf73b7fbfb0236765d2e
Bee Gees - How Deep is Your Love
Wham! - Last Christmas
Simon and Garfunkel - The Sound of Silence
Chris De Burgh - Lady in Red
@kevin1024
kevin1024 / upgrade_mysql.sh
Last active Aug 29, 2015
Upgrade MySQL 5.0 -> MariaDB 10.x on Centos5
View upgrade_mysql.sh
# Run this file as root and cross your fingers.
# Making a backup first is probably a good idea.
# The last step will prompt you for your mysql root password.
YUMREPO_FILEPATH="/etc/yum.repos.d/MariaDB.repo"
MYCNF_FILEPATH="/etc/my.cnf.d/server.cnf"
/bin/cat <<EOM >$YUMREPO_FILEPATH
# MariaDB 10.0 CentOS repository list - created 2014-06-20 18:47 UTC
# http://mariadb.org/mariadb/repositories/
View keybase.md

Keybase proof

I hereby claim:

  • I am kevin1024 on github.
  • I am kevin1024 (https://keybase.io/kevin1024) on keybase.
  • I have a public key whose fingerprint is 048D 30BE 6FEA F12A D1D4 785F 4D7E 75E7 3C7F A179

To claim this, I am signing this object:

View parse_kml.py
from xml.etree import ElementTree
from shapely.geometry import Polygon, Point
import json
poly_table = []
data = open('/tmp/chicago.kml')
tree = ElementTree.parse(data)
namespace = tree.getroot().tag[1:].split("}")[0]
placemarks = tree.findall(".//{%s}Placemark" % namespace)
View gist:9149941
#!ipxe
set coreos-version dev-channel
set base-url http://storage.core-os.net/coreos/amd64-generic/${coreos-version}
kernel ${base-url}/coreos_production_pxe.vmlinuz root=squashfs: state=tmpfs: sshkey="sh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDWzDKMlhF44JiKOhdmDmLGbXSgqaVi5ho5tVgTR8aupQbBxK3Xp//xVGM12G8Niue0YNjHX3epHCKLqjKjzXVE/PwJBa8whf0YNZ6MGcqcSZBFWsFN6eg4EHZ81q9g1JR2SWUsTSLRdqtO6TNhBCw5qkQ9X8o/Y8I/GT7PIombMsaUOAZgXHIdua/ToJrLg4tnD+1wLXBTlV1nAvEDRchtywer5rMpBsimGg4F9ioQF7ygLJn7iJhmPS946UvQZCfwlY6+kRxMNcnMorqJwLiXUMcMes/XNgpXZJblER3uXmIRhMrjjr0CBe/wBV+uwIOQ7ie2a2YBeiX/qWHNv+5d"
initrd ${base-url}/coreos_production_pxe_image.cpio.gz
boot
@kevin1024
kevin1024 / resque_rate
Created Feb 16, 2013
Munin plugin that gives the resque rate of processing
View resque_rate
#!/bin/sh
VALS=$(curl --silent http://127.0.0.1:5678/stats.txt)
PROCESSED=$(echo "$VALS" | grep "resque.processed")
case $1 in
config)
cat <<'EOM'
graph_title Resque Processed
@kevin1024
kevin1024 / resque_queues
Created Feb 16, 2013
Munin plugin for resque queue stats
View resque_queues
#!/bin/sh
VALS=$(curl --silent http://127.0.0.1:5678/stats.txt)
QUEUES=$(echo "$VALS" | grep "queues")
case $1 in
config)
cat <<'EOM'
graph_title Resque Queues
View gist:326293
Capital Ships:
Carrier:
- [Caldari Carrier 1, Gallente Carrier 1, Amarr Carrier 1, Minmatar Carrier 1]
- Jump Drive Operation 1
- Capital Ships 1
- Fighters 1
- [Capital Repair Systems 1, Capital Shield Operation 1]
- [Capital Energy Emission Systems 1, Capital Shield Emission Systems 1, Capital Remote Armor Repair Systems 1]
Dreadnought:
- [Amarr Dreadnought 1, Caldari Dreadnought 1, Gallente Dreadnought 1, Minmatar Dreadnought 1]
You can’t perform that action at this time.