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
directoryContainingAllRepos="" # directory containing all git repo's | |
oldGitRemoteServer="" # current remote server url for example gitlab.com | |
newGitRemoteServer="" # new remote server url for example git.example.com | |
cd $directoryContainingAllRepos | |
find * -maxdepth 0 -type d \( ! -name . \) -print | while read dir | |
do | |
cd $dir | |
if [ -d ".git" ] | |
then | |
remoteUrl1="$(git config --get remote.origin.url)" |
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
SELECT | |
t.TABLE_SCHEMA, | |
t.TABLE_NAME, | |
s.INDEX_NAME, | |
s.COLUMN_NAME, | |
s.SEQ_IN_INDEX, | |
( | |
SELECT | |
MAX( SEQ_IN_INDEX ) | |
FROM |
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 python | |
# -*- coding: utf-8 -*- | |
# @Function | |
# Find duplicate class among java libs. | |
# | |
# @Usage | |
# $ show-duplicate-java-classes # find jars from current dir | |
# $ show-duplicate-java-classes path/to/lib_dir1 /path/to/lib_dir2 | |
# $ show-duplicate-java-classes -c path/to/class_dir1 -c /path/to/class_dir2 | |
# |
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
local ip = ngx.var.remote_addr | |
local redis_connect_timeout = 1000 | |
local redis_host = "192.168.12.203" | |
local redis_port = 6379 | |
local redis_prefix = "sms:" | |
local redis_white_list_key = redis_prefix .. "white" | |
local redis_black_list_key = redis_prefix .. "black:" | |
local redis_limit_key = redis_prefix .. "limit:" | |
local redis_limit_mode_key = redis_prefix .. "mode" | |
local now = os.time() |