View gist:ca164ec0fee42d72e13d2e01fc0b8b51
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
Set WshShell = CreateObject("WScript.Shell") | |
MsgBox ConvertToKey(WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DigitalProductId")) | |
Function ConvertToKey(Key) | |
Const KeyOffset = 52 | |
i = 28 | |
Chars = "BCDFGHJKMPQRTVWXY2346789" | |
Do | |
Cur = 0 | |
x = 14 |
View fingerprint.js
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
var fingerprint = (function(window, screen, navigator) { | |
function checksum(str) { | |
var hash = 5381, | |
i = str.length; | |
while (i--) hash = (hash * 33) ^ str.charCodeAt(i); | |
return hash >>> 0; | |
} |
View mysql_create_newuser_newdb.sh
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 | |
newUser='testuser' | |
newDbPassword='testpwd' | |
newDb='testdb' | |
host=localhost | |
#host='%' | |
commands="CREATE DATABASE \`${newDb}\`;CREATE USER '${newUser}'@'${host}' IDENTIFIED BY '${newDbPassword}';GRANT USAGE ON *.* TO '${newUser}'@'${host}' IDENTIFIED BY '${newDbPassword}';GRANT ALL privileges ON \`${newDb}\`.* | |
TO '${newUser}'@'${host}';FLUSH PRIVILEGES;" |
View mysql_variables.sh
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/sh# | |
mysql -e "show variables; show status" | awk ' | |
{ | |
VAR[$1]=$2 | |
} | |
END { | |
MAX_CONN = VAR["max_connections"] | |
MAX_USED_CONN = VAR["Max_used_connections"] | |
BASE_MEM=VAR["key_buffer_size"] + VAR["query_cache_size"] + VAR["innodb_buffer_pool_size"] + VAR["innodb_additional_mem_pool_size"] + VAR["innodb_log_buffer_size"] |
View mailmap.sh
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/sh | |
paster() { | |
while read email; do | |
[ -z "$email" ] || echo "$1" "$email" | |
done | |
} | |
grouper() { | |
IFS="<" |
View commitsByWeekday.sh
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
function commitsByWeekday() { | |
optionPicked "Git commits by weekday:" | |
echo -e "\tday\tsum" | |
local counter=1 | |
for i in Mon Tue Wed Thu Fri Sat Sun | |
do | |
echo -en "\t$counter\t$i\t" | |
git -c log.showSignature=false shortlog -n $_merges --format='%ad %s' \ | |
$_since $_until | grep "$i " | wc -l | |
counter=$((counter+1)) |
View accesslog.sh
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 | |
LOGFILE="access.log" | |
LIMIT=10 | |
while getopts l:f: option | |
do | |
case "${option}" | |
in | |
l) LIMIT=${OPTARG};; |
View redis_simple_key_stats.sh
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 bash | |
human_size() { | |
awk -v sum="$1" 'BEGIN { | |
hum[1024^3]="Gb"; | |
hum[1024^2]="Mb"; | |
hum[1024]="Kb"; | |
for (x=1024^3; x>=1024; x/=1024) { | |
if (sum>=x) { |
View mongodb_find_and_kill_slow_query.js
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
var maxSecsRunning = 600; | |
var dryRun = true; | |
var currOp = db.currentOp(); | |
for (var oper in currOp.inprog) { | |
var op = currOp.inprog[oper-0]; | |
if (op.secs_running > maxSecsRunning && op.op == "command" ) { | |
print("Killing opId: " + op.opid | |
+ " running for over secs: " | |
+ op.secs_running |
View GoogleHackMasterList.txt
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
admin account info" filetype:log | |
!Host=*.* intext:enc_UserPassword=* ext:pcf | |
"# -FrontPage-" ext:pwd inurl:(service | authors | administrators | users) "# -FrontPage-" inurl:service.pwd | |
"AutoCreate=TRUE password=*" | |
"http://*:*@www” domainname | |
"index of/" "ws_ftp.ini" "parent directory" | |
"liveice configuration file" ext:cfg -site:sourceforge.net | |
"parent directory" +proftpdpasswd | |
Duclassified" -site:duware.com "DUware All Rights reserved" | |
duclassmate" -site:duware.com |
NewerOlder