Skip to content

Instantly share code, notes, and snippets.

View omegazeng's full-sized avatar
🌘
月に代わって、お仕置きよ!

Omega Zeng omegazeng

🌘
月に代わって、お仕置きよ!
View GitHub Profile
@omegazeng
omegazeng / sslocal.service
Last active February 1, 2019 09:43 — forked from ygmpkk/sslocal.service
ShadowSocks Client Systemd Service
# /etc/systemd/system/sslocal.service
[Unit]
Description=Daemon to start Shadowsocks Client
Wants=network-online.target
After=network.target
[Service]
Type=simple
ExecStart=/usr/bin/sslocal -c /etc/shadowsocks/config.json
@omegazeng
omegazeng / build_docker_image.sh
Last active September 27, 2023 14:00
Build docker image and push to harbor with jenkins
#!/bin/bash
# https://gist.github.com/omegazeng/d9d07a8a1c2bd7bb2cab38e32a12058b
export LC_ALL=en_US.UTF-8
set +x
REGISTRY_URL=$1
IMAGE_NAME=$2
@omegazeng
omegazeng / run-mongodump.sh
Last active August 9, 2018 03:39
Script to create full backups with mongodump.
#!/bin/sh
# https://gist.github.com/omegazeng/18b58dfc6995aaeed0bce70bdbb30caf
# use admin
# db.createUser(
# {
# user: "backup",
# pwd: "YourPassword",
# roles: [ "backup", "restore" ]
# }
@omegazeng
omegazeng / run-xtrabackup.sh
Last active September 12, 2020 18:57 — forked from jmfederico/run-xtrabackup.sh
Script to create full/incremental backups with mariabackup/xtrabackup.
#!/bin/sh
# https://gist.github.com/omegazeng/ea3a2b1b52caca62a81e859c34eadba4
# GRANT RELOAD, LOCK TABLES, REPLICATION CLIENT ON *.* TO 'backup'@'localhost' identified by 'YourPassword';
# FLUSH PRIVILEGES;
#
# Usage:
# MYSQL_PASSWORD=YourPassword bash run-xtrabackup.sh
MYSQL_USER=backup