Skip to content

Instantly share code, notes, and snippets.

View tsuyo's full-sized avatar
💭
Where there is a will, there is a way

Tsuyoshi Miyake tsuyo

💭
Where there is a will, there is a way
View GitHub Profile
@tsuyo
tsuyo / rename-rt-repo.sh
Last active May 11, 2021 09:55
Rename a JFrog Artifactory repository
#!/bin/bash
# Rename a JFrog Artifactory repository
# See https://jfrog.com/knowledge-base/is-there-a-way-to-rename-a-repository/ for details
usageAndExit() {
echo "Usage: "
echo " $ export ARTIFACTORY_USER=..."
echo " $ export ARTIFACTORY_PASS=..."
echo " $ $0 -u <ARTIFACTORY_URL> [-d] <OLD_REPO> <NEW_REPO>"
@tsuyo
tsuyo / create_mysql_db.sh
Created October 4, 2021 11:54
Create a MySQL Database
usage() {
echo "Usage: $0 <DB_NAME> <DB_USER> <DB_PASSWORD>"
exit
}
DB_NAME=$1
DB_USER=$2
DB_PASSWORD=$3
[ -z "${DB_NAME}" -o -z "${DB_USER}" -o -z "${DB_PASSWORD}" ] && usage
@tsuyo
tsuyo / create_git_repo_on_local.sh
Created October 4, 2021 11:58
Create a git repo on local disk
#!/bin/sh
# variables
git_location=$1
proj_name=`basename $PWD`
# error check
[ "${git_location}" = "" ] && echo "usage: $0 <git_dir>" && exit
# git commands
@tsuyo
tsuyo / htpasswd_batch.py
Created October 4, 2021 12:06
htpasswd_batch.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
from subprocess import Popen,PIPE
dav_svn_passwd = '/etc/apache2/dav_svn.passwd'
if len(sys.argv) < 2:
print "Usage:", sys.argv[0], "<passwd.txt>"