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};; |
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)) |
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="<" |
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"] |
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;" |
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; | |
} |
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 |
OlderNewer