This file contains hidden or 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
--- functions.php.orig 2012-07-04 00:20:58.000000000 +0000 | |
+++ functions.php 2012-07-04 00:34:48.000000000 +0000 | |
@@ -1641,14 +1641,14 @@ | |
*/ | |
function wp_ext2type( $ext ) { | |
$ext2type = apply_filters( 'ext2type', array( | |
- 'audio' => array( 'aac', 'ac3', 'aif', 'aiff', 'm3a', 'm4a', 'm4b', 'mka', 'mp1', 'mp2', 'mp3', 'ogg', 'oga', 'ram', 'wav', 'wma' ), | |
- 'video' => array( 'asf', 'avi', 'divx', 'dv', 'flv', 'm4v', 'mkv', 'mov', 'mp4', 'mpeg', 'mpg', 'mpv', 'ogm', 'ogv', 'qt', 'rm', 'vob', 'wmv' ), | |
- 'document' => array( 'doc', 'docx', 'docm', 'dotm', 'odt', 'pages', 'pdf', 'rtf', 'wp', 'wpd' ), | |
+ 'audio' => array( 'aac', 'ac3', 'aif', 'aiff', 'm3a', 'm4a', 'm4b', 'mka', 'mp1', 'mp2', 'mp3', 'ogg', 'oga', 'ram', 'wav', 'wma' ), |
This file contains hidden or 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
# Copyright (C) 2012 Mark Caudill | |
# | |
# 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 copies of the Software, and to permit | |
# persons to whom the Software is furnished to do so, subject to the | |
# following conditions: | |
# |
This file contains hidden or 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
+--------+----------+-----------+-------------------+ | |
| name | latitude | longitude | distance | | |
+--------+----------+-----------+-------------------+ | |
| third | 3.000000 | 3.000000 | 313.4147056057557 | | |
| second | 2.000000 | 2.000000 | 470.241165991588 | | |
| first | 1.000000 | 1.000000 | 627.115323012258 | | |
+--------+----------+-----------+-------------------+ | |
3 rows in set (0.00 sec) |
This file contains hidden or 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
SELECT | |
`name`, | |
`latitude`, | |
`longitude`, | |
( | |
6356.78 * | |
acos(cos(radians('LAT')) * cos(radians(`latitude`)) * | |
cos(radians(`longitude`) - radians('LONG')) + | |
sin(radians('LAT')) * sin(radians(`latitude`))) | |
) AS `distance` |
This file contains hidden or 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
INSERT INTO points (latitude, longitude, name) VALUES ('1', '1', 'first'); | |
INSERT INTO points (latitude, longitude, name) VALUES ('2', '2', 'second'); | |
INSERT INTO points (latitude, longitude, name) VALUES ('3', '3', 'third'); |
This file contains hidden or 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
CREATE DATABASE `data`; | |
CREATE TABLE IF NOT EXISTS `data`.`points` ( | |
`id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, | |
`latitude` DECIMAL(9,6) NOT NULL, | |
`longitude` DECIMAL(9,6) NOT NULL, | |
`name` VARCHAR(64) NOT NULL, | |
PRIMARY KEY(`id`) | |
) ENGINE = MyISAM; |
This file contains hidden or 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/sh | |
ssh_log=/var/log/auth.log | |
iptables_rules=/etc/iptables.up.rules | |
max_attempts=20 | |
# Get list of IPs from failed SSH attempts | |
addresses=$(cat /var/log/auth.log | \ | |
grep -Ei 'invalid user|failed password' | \ | |
grep -Eo '[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+' | \ |
This file contains hidden or 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
grep *web* /etc/hosts | awk '{print $3}' | sort | uniq | sshpt.py --stdin -u root "/etc/init.d/httpd restart" |
This file contains hidden or 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
[Credentials] | |
aws_access_key_id = | |
aws_secret_access_key = |
This file contains hidden or 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
*/5 * * * * /home/mcaudill/src/git/dynroute53/bin/python /home/mcaudill/src/git/dynroute53/update.py |