Add Music Studio, Migrate from GitHub to Personal Gitea (#1)
Reviewed-on: #1
This commit is contained in:
@ -107,6 +107,16 @@
|
||||
become_user: "{{ user }}"
|
||||
when: user_user.home != ""
|
||||
|
||||
- name: General | Account Management | Users | User | Create Folders | Coding
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
mode: '0755'
|
||||
loop:
|
||||
- "{{ user_user.home }}/Code"
|
||||
become_user: "{{ user }}"
|
||||
when: user_user.home != "" and coding == true
|
||||
|
||||
- name: General | Account Management | Users | Home Permissions
|
||||
shell: "chmod 700 {{ user_user.home }}/../*"
|
||||
|
||||
@ -118,8 +128,6 @@
|
||||
alias_cp: alias cp='cp -v'
|
||||
alias_mv: alias mv='mv -v'
|
||||
alias_rm: alias rm='echo "Use mv ~/TRASH/ instead!"'
|
||||
alias_clean_dir: alias clean-dir='mv * ~/TRASH/'
|
||||
alias_clean_trash: alias clean-trash='sh -c "rm -rfv ~/TRASH/*"'
|
||||
export_path_additions: export PATH="~/bin:"{{ global_bin }}":$PATH"
|
||||
function_wttr: |
|
||||
function weather() {
|
||||
@ -131,7 +139,7 @@
|
||||
Useful location types:
|
||||
$zip_code | Ex: 12345
|
||||
$city,$state | Ex: Austin,Texas
|
||||
@$domain_dot_extension | Ex: @github.com
|
||||
@$domain_dot_extension | Ex: @gitea.com
|
||||
~$special_location | Ex: ~Manitou Incline
|
||||
Full documentation: https://github.com/chubin/wttr.in'
|
||||
return 1
|
||||
@ -161,6 +169,9 @@
|
||||
|
||||
unset OPTIND
|
||||
unset accept
|
||||
unset goodbye
|
||||
unset only_sys
|
||||
unset only_flat
|
||||
while getopts ":hygsf" opt; do
|
||||
case $opt in
|
||||
h) echo -e "$usage"
|
||||
@ -359,11 +370,23 @@
|
||||
return 0
|
||||
}
|
||||
alias check_trash="check-trash"
|
||||
alias_clean_trash: alias clean-trash='check-trash --clean'
|
||||
alias_trash_check: alias trash-check='check-trash'
|
||||
alias_trash_clean: alias trash-clean='trash-check --clean'
|
||||
alias_clean_dir: |
|
||||
function clean-dir() {
|
||||
clean_dir="`date '+%Y%m%d_%H%M%S'`_CLEANED"
|
||||
trash_dir="$HOME/TRASH/$clean_dir"
|
||||
curr_dir="`pwd`"
|
||||
mkdir -pv "$trash_dir"
|
||||
echo "$curr_dir is being cleaned at `date`." | tee "$trash_dir"/INFO.txt
|
||||
mv -v ..?* .[!.]* * "$trash_dir"/ | tee -a "$trash_dir"/INFO.txt
|
||||
}
|
||||
function_clean: |
|
||||
function clean() {
|
||||
sudo df -h
|
||||
check-trash --clean
|
||||
sudo df -h
|
||||
sudo du -hs
|
||||
clean-dir
|
||||
sudo du -hs
|
||||
}
|
||||
function_flatpak_usage: |
|
||||
function flatpak-usage() {
|
||||
@ -438,10 +461,17 @@
|
||||
alias_code_check: |
|
||||
alias code-check='
|
||||
ls -d ~/Code/* | while read project; do
|
||||
if [[ ! -d $project ]]; then
|
||||
continue
|
||||
fi
|
||||
echo "*** `basename $project` ***"
|
||||
cd $project
|
||||
git pull
|
||||
git push
|
||||
if [[ -d .git ]]; then
|
||||
git pull
|
||||
git push
|
||||
else
|
||||
echo "Not a Git project, skipping!"
|
||||
fi
|
||||
done
|
||||
'
|
||||
alias_code_reset: |
|
||||
@ -456,23 +486,33 @@
|
||||
git checkout dev
|
||||
done
|
||||
'
|
||||
alias_code_reseed: |
|
||||
alias code-reseed='
|
||||
unseed_dir="$HOME/TRASH/`date +%Y-%m-%d`_UnseededCodeProjects"
|
||||
function_code_reseed: |
|
||||
function git_projects_to_sync {
|
||||
cat <<- EOF
|
||||
env-ansible
|
||||
env-docker
|
||||
env-termux
|
||||
nodejs-website
|
||||
android-break-the-habit
|
||||
android-tictactoe
|
||||
android-expense-tracker
|
||||
android-example-database-room
|
||||
android-carb-up
|
||||
ebook-health-protocol
|
||||
EOF
|
||||
}
|
||||
function code-reseed {
|
||||
unseed_dir="$HOME/TRASH/`date ++%Y%m%d_%H%M%S`_UnseededCodeProjects"
|
||||
mkdir -pv "$unseed_dir"
|
||||
mv -v ~/Code/*{ansible,docker,nix,break,website,www,tictactoe,-dev}* \
|
||||
"$unseed_dir"/ 2>/dev/null
|
||||
git clone git@github.com:Hyperling/Ansible \
|
||||
--branch dev ~/Code/ansible-dev
|
||||
git clone git@github.com:Hyperling/Docker \
|
||||
--branch dev ~/Code/docker-dev
|
||||
git clone git@github.com:Hyperling/Website \
|
||||
--branch dev ~/Code/website-dev
|
||||
git clone git@github.com:Hyperling/BreakTheHabit \
|
||||
--branch dev ~/Code/breakthehabit-dev
|
||||
git clone git@github.com:Hyperling/TicTacToeAndroid \
|
||||
--branch dev ~/Code/tictactoe-dev
|
||||
'
|
||||
mv -v ~/Code/* "$unseed_dir"/ 2>/dev/null
|
||||
git_repo_ssh={{ git_repo_ssh }}
|
||||
git_main_project={{ git_project }}
|
||||
git_repo_ssh_basename=${git_repo_ssh//$git_main_project/}
|
||||
git_projects_to_sync | while read git_project; do
|
||||
git clone ${git_repo_ssh_basename}${git_project} \
|
||||
--branch dev ~/Code/$git_project
|
||||
done
|
||||
}
|
||||
function_clean_filenames: |
|
||||
function clean-filenames() {
|
||||
# Must provide the directory you'd like to clean all the filenames in.
|
||||
@ -503,7 +543,7 @@
|
||||
echo -e "\nDone!\n"
|
||||
}
|
||||
alias_clone: |
|
||||
alias clone="rsync -auPh --delete"
|
||||
alias clone="rsync -auPhz --delete"
|
||||
export_hyperling: |
|
||||
export HYPERLING6="2a07:e03:3:80::1"
|
||||
export HYPERLING4="185.130.47.173"
|
||||
@ -513,6 +553,8 @@
|
||||
if [[ -e $DOCKER_SOURCE && $LOGNAME == "root" ]]; then
|
||||
source $DOCKER_SOURCE
|
||||
fi
|
||||
alias_scan: |
|
||||
alias scan="nmap -A -p- --script=vuln"
|
||||
|
||||
- name: General | Account Management | Users | Files | Common Variable
|
||||
set_fact:
|
||||
@ -547,12 +589,13 @@
|
||||
{{ alias_docker_restart }}
|
||||
{{ alias_code_check }}
|
||||
{{ alias_code_reset }}
|
||||
{{ alias_code_reseed }}
|
||||
{{ function_code_reseed }}
|
||||
{{ function_clean_filenames }}
|
||||
{{ function_clean_filenames_tree }}
|
||||
{{ alias_clone }}
|
||||
{{ export_hyperling }}
|
||||
{{ source_docker_env }}
|
||||
{{ alias_scan }}
|
||||
|
||||
- name: General | Account Management | Users | Files | .bashrc
|
||||
blockinfile:
|
||||
|
Reference in New Issue
Block a user