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
# Re-add sslwrap to Python 2.7.9 | |
import inspect | |
__ssl__ = __import__('ssl') | |
try: | |
_ssl = __ssl__._ssl | |
except AttributeError: | |
_ssl = __ssl__._ssl2 | |
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
#!/usr/bin/perl -w | |
# | |
# This script was developed by Robin Barker ([email protected]), | |
# from Larry Wall's original script eg/rename from the perl source. | |
# | |
# This script is free software; you can redistribute it and/or modify it | |
# under the same terms as Perl itself. | |
# | |
# Larry(?)'s RCS header: | |
# RCSfile: rename,v Revision: 4.1 Date: 92/08/07 17:20:30 |
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
# Nginx can serve FLV/MP4 files by pseudo-streaming way without any specific media-server software. | |
# To do the custom build we use 2 modules: --with-http_secure_link_module --with-http_flv_module | |
# This module "secure-link" helps you to protect links from stealing away. | |
# | |
# NOTE: see more details at coderwall: http://coderwall.com/p/3hksyg | |
cd /usr/src | |
wget http://nginx.org/download/nginx-1.5.13.tar.gz | |
tar xzvf ./nginx-1.5.13.tar.gz && rm -f ./nginx-1.5.13.tar.gz |
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
#!/usr/bin/perl -w | |
############################################################################## | |
## sendEmail | |
## Written by: Brandon Zehm <[email protected]> | |
## | |
## License: | |
## sendEmail (hereafter referred to as "program") is free software; | |
## you can redistribute it and/or modify it under the terms of the GNU General | |
## Public License as published by the Free Software Foundation; either version | |
## 2 of the License, or (at your option) any later version. |
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
curl --socks5 127.0.0.1:7070 http://cn.nytimes.com/ 2>/dev/null | grep -o '<a href="[^"]\+" title="[^"]\+"' | sed -e 's/<a href="//g' | sed -e 's/" title="/ /g' | sed -e 's/"//g' | while read url title | |
do if [[ ${url:0:5} != "http:" ]] | |
then | |
url="http://cn.nytimes.com$url" | |
fi | |
echo $url | mail -s "$title" [email protected] | |
done |
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 tables.owner || '.' || | |
tables.table_name | |
as table_owner | |
From all_tables tables, | |
(Select | |
owner, | |
TABLE_NAME, | |
constraint_type, | |
CONSTRAINT_NAME | |
FROM ALL_CONSTRAINTS |
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
declare @dbname varchar(255) | |
declare @check_mssql_health_USER varchar(255) | |
declare @check_mssql_health_PASS varchar(255) | |
declare @check_mssql_health_ROLE varchar(255) | |
declare @source varchar(255) | |
declare @options varchar(255) | |
declare @backslash int | |
/*******************************************************************/ | |
SET @check_mssql_health_USER = '"[Servername|Domainname]\nagios"' |
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 sql.last_load_time, sql.elapsed_time/1000000, sql.sql_text from v$sql sql where sql.last_load_time>to_char(systimestamp - INTERVAL '1' HOUR, 'YYYY-MM-DD/HH24:MI:SS') and sql.elapsed_time > 1000000 * 60 order by sql.elapsed_time desc; |
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 | |
DB_USER="root" | |
DB_PASS="123456" | |
DB_NAME="blog" | |
LOG_PATH="/data/db/errlog.log" | |
TIME=`date +%Y-%m-%d" "%H:%M:%S` | |
TABLES=`/usr/bin/awk '/'"repair failed"'/ {print $6}' $LOG_PATH | sort -k1n | uniq -c | awk -F "'" '{print $2}' | awk -F '/' '{print $3}'` | |
if [ -n "$TABLES" ] |
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 a.sid, | |
b.spid | |
FROM v$session a, | |
v$process b | |
WHERE A.paddr = b.addr | |
AND b.spid = 41484400; |