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 -*- | |
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>" |
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 | |
# variables | |
git_location=$1 | |
proj_name=`basename $PWD` | |
# error check | |
[ "${git_location}" = "" ] && echo "usage: $0 <git_dir>" && exit | |
# git commands |
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
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 |
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 | |
# 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>" |
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 | |
cat > /tmp/dashboard-adminuser-1.yaml << EOF | |
apiVersion: v1 | |
kind: ServiceAccount | |
metadata: | |
name: admin-user | |
namespace: kubernetes-dashboard | |
EOF |
Download Artifactory or Download Artifactory from Bintray
$ echo $JAVA_HOME
/Library/Java/JavaVirtualMachines/jdk-11.0.5.jdk/Contents/Home
$ export JFROG_HOME=/opt/jfrog
$ tar -C $JFROG_HOME -zxvf jfrog-artifactory-pro-7.2.1-darwin.tar.gz
$ ln -s /opt/jfrog/artifactory-pro-7.2.1 $JFROG_HOME/artifactory-pro
$ $JFROG_HOME/artifactory-pro/app/bin/artifactoryctl start
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
hdfs dfs -mkdir input | |
hdfs dfs -put ${HADOOP_HOME}/etc/hadoop/*.xml input | |
hadoop jar ${HADOOP_HOME}/share/hadoop/mapreduce/hadoop-mapreduce-examples-*.jar grep input output 'dfs[a-z.]+' | |
hdfs dfs -cat output/* |
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
create 'test', 'cf' | |
list 'test' | |
describe 'test' | |
put 'test', 'row1', 'cf:a', 'value1' | |
put 'test', 'row2', 'cf:b', 'value2' | |
put 'test', 'row3', 'cf:c', 'value3' | |
scan 'test' | |
get 'test', 'row1' | |
disable 'test' | |
enable 'test' |
NewerOlder