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
http { | |
... | |
server { | |
listen 80; | |
server_name example.com; | |
root /var/www/exmaple.com/www/; | |
index index.cfm; | |
set $lucee_context "example.com"; | |
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
-- This pull back a list of tables which have NON-UTF8 encoded columns and creates a SQL script to fix them (and the table itself) | |
SELECT CONCAT("ALTER TABLE ",t.TABLE_SCHEMA,".",t.TABLE_NAME," CHARACTER SET utf8 COLLATE utf8_general_ci;", | |
"ALTER TABLE ",t.TABLE_SCHEMA,".",t.TABLE_NAME," CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;") | |
AS sql_to_copy_and_run | |
FROM information_schema.TABLES t | |
INNER JOIN information_schema.`COLUMNS` c ON t.TABLE_SCHEMA = c.TABLE_SCHEMA | |
WHERE | |
t.TABLE_SCHEMA = ? -- Replace ? with your Database/Schema name | |
AND t.table_type = 'BASE TABLE' AND character_set_name IS NOT NULL AND character_set_name <> 'utf8' | |
GROUP BY t.TABLE_SCHEMA, t.TABLE_NAME |
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
#Block all IP6 traffic | |
*filter | |
# Reject all IPv6 on all chains. | |
-A INPUT -j DROP | |
-A FORWARD -j DROP | |
-A OUTPUT -j DROP | |
COMMIT |
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
# Found on https://nodeswat.com/blog/setting-up-a-secure-node-js-web-application/ | |
# Slightly modified | |
*filter | |
# Default policy is to drop all traffic | |
-P INPUT DROP | |
-P FORWARD DROP | |
-P OUTPUT DROP |
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
sp_MSforeachdb 'SELECT "?" AS DB, | |
r.SPECIFIC_SCHEMA, r.routine_name, r.ROUTINE_DEFINITION, p.ORDINAL_POSITION, p.PARAMETER_MODE, p.PARAMETER_NAME, p.DATA_TYPE | |
FROM [?].INFORMATION_SCHEMA.ROUTINES r | |
JOIN [?].INFORMATION_SCHEMA.PARAMETERS p ON r.SPECIFIC_SCHEMA = p.SPECIFIC_SCHEMA AND r.SPECIFIC_NAME = p.SPECIFIC_NAME | |
WHERE | |
r.ROUTINE_TYPE = ''PROCEDURE'' | |
AND left(r.ROUTINE_NAME,2) <> ''dt'' | |
AND r.ROUTINE_DEFINITION LIKE ''%someSQLCode%'' | |
ORDER BY r.SPECIFIC_NAME ASC, p.ORDINAL_POSITION ASC' |
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
sp_MSforeachdb 'SELECT "?" AS DB, | |
r.SPECIFIC_SCHEMA, r.routine_name, r.ROUTINE_DEFINITION, p.ORDINAL_POSITION, p.PARAMETER_MODE, p.PARAMETER_NAME, p.DATA_TYPE | |
FROM [?].INFORMATION_SCHEMA.ROUTINES r | |
JOIN [?].INFORMATION_SCHEMA.PARAMETERS p ON r.SPECIFIC_SCHEMA = p.SPECIFIC_SCHEMA AND r.SPECIFIC_NAME = p.SPECIFIC_NAME | |
WHERE | |
r.ROUTINE_TYPE = ''PROCEDURE'' | |
AND left(r.ROUTINE_NAME,2) <> ''dt'' | |
AND r.routine_name LIKE ''%yourStoredProcName%'' | |
ORDER BY r.SPECIFIC_NAME ASC, p.ORDINAL_POSITION ASC' |
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
sp_MSforeachdb 'SELECT "?" AS DB, * FROM [?].sys.tables WHERE name like ''%tableNameYouAreSearchingFor%''' |
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
pingIpAddress=google.com | |
while : | |
do | |
ping -t 2 -o -c 1 $pingIpAddress || say ping to $pingIpAddress failing | |
sleep 2 | |
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
pingAddress=google.com | |
while : | |
do | |
ping -t 2 -o pingAddress && say ping $pingAddress working | |
sleep 2 | |
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
CREATE TABLE #Result | |
( | |
spid int, | |
ecid int, | |
status varchar(max), | |
loginname varchar(max), | |
hostname varchar(max), | |
blk varchar(max), | |
dbname varchar(max), | |
cmd varchar(max), |