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
$ brew services stop mysql | |
$ pkill mysqld | |
$ rm -rf /usr/local/var/mysql/ # NOTE: this will delete your existing database!!! | |
$ brew postinstall mysql | |
$ brew services restart mysql | |
$ mysql -uroot |
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
user nginx; | |
worker_processes auto; | |
error_log /var/log/nginx/error.log; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 1024; | |
} | |
http { |
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
# Export dump particular database. | |
$ kubectl exec {{podName}} -n {{namespace}} -- mysqldump -u {{dbUser}} -p{{password}} {{DatabaseName}} > <scriptName>.sql | |
# Export dump all databases. | |
$ kubectl exec {{podName}} -n {{namespace}} -- mysqldump -u {{dbUser}} -p{{password}} --all-databases > <scriptName>.sql | |
# Restore a database from a dump. | |
$ kubectl exec -it {{podName}} -n {{namespace}} -- mysql -u {{dbUser}} -p{{password}} {{DatabaseName}} < <scriptName>.sql |
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 -*- | |
''' | |
#============================================================================= | |
# FileName: http_ser.py | |
# Desc: http server | |
# Author: Sungis | |
# Email: mr.sungis@gmail.com | |
# HomePage: http://sungis.github.com | |
# Version: 0.0.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
node { | |
// https://support.cloudbees.com/hc/en-us/articles/115001595227-How-To-Specify-A-Specific-JDK-In-Pipeline- | |
// configure the JDK in Manage Jenkins > Global Tool Configuration > JDK | |
jdk = tool name: 'JDK17' | |
env.JAVA_HOME = "${jdk}" | |
echo "jdk installation path is: ${jdk}" | |
// next 2 are equivalents | |
sh "${jdk}/bin/java -version" |
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
# How To Install Java on CentOS and Fedora | |
# https://www.digitalocean.com/community/tutorials/how-to-install-java-on-centos-and-fedora | |
wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u40-b26/jdk-8u40-linux-x64.tar.gz" | |
wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u40-b26/jdk-8u40-linux-x64.rpm" |
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
def gitURL = "git@github.com:xxxxx.git" | |
def command = "git ls-remote -h $gitURL" | |
def proc = command.execute() | |
proc.waitFor() | |
if ( proc.exitValue() != 0 ) { | |
return ["develop", "master"] | |
} |
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 | |
# | |
# PostgreSQL Backup Script Ver 1.0 | |
# http://autopgsqlbackup.frozenpc.net | |
# Copyright (c) 2005 Aaron Axelsen <axelseaa@amadmax.com> | |
# | |
# This script is based of the AutoMySQLBackup Script Ver 2.2 | |
# It can be found at http://sourceforge.net/projects/automysqlbackup/ | |
# | |
# The PostgreSQL changes are based on a patch agaisnt AutoMySQLBackup 1.9 |
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 | |
isExistApp=`ps -ef|grep data-jar-with-dependencies.jar|grep -v grep|awk '{print $2}'` | |
if [[ -n $isExistApp ]]; then | |
kill -9 $isExistApp | |
echo 'app stopped' | |
fi |
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 | |
isExistApp = `pgrep httpd` | |
if [[ -n $isExistApp ]]; then | |
service httpd stop | |
fi |
NewerOlder