Skip to content

Instantly share code, notes, and snippets.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ThaiDat
ThaiDat / git-publish
Created July 14, 2023 05:25
Git extension to publish a new local branch to remote
#!/bin/sh
# Usage: pushes current checkout branch to remote
# Ex: git publish origin
if [ -z ${1+x} ] && [ $(git remote | wc -l) -eq 1 ]; then
remote=$(git remote)
else
remote=$1
fi
git push --set-upstream $remote $(git branch --show-current)
@ThaiDat
ThaiDat / clean.sh
Last active July 31, 2023 10:36
The highly-customizable fast-and-simple bash script that will do various text-processing operations on files in a certain directory. It is useful for code formatting at the repository level and can be used in continuous integration and deployment (CI/CD) pipelines.
# CL_FILE_EXTENSIONS: The script will apply on files with given extensions
if [ -z ${CL_FILE_EXTENSIONS+x} ]; then
CL_FILE_EXTENSIONS=(txt md json xml yaml yml sh bat)
fi
# CL_IGNORED_SUB_DIR: The script will ignore files in given directories
if [ -z ${CL_IGNORED_SUB_DIR+x} ]; then
CL_IGNORED_SUB_DIR=(.git)
fi
@ThaiDat
ThaiDat / logs.txt
Last active February 16, 2024 18:08
My Logs
2024/02/08
+ Publish pyspark-tutorial.ipynb as a gist
2024/02/03
+ Publish my official blog at https://note.datengineer.dev/
2024/01/09
+ Fix CudaText #5342 Allow cuda_tab_icons to show default icon for None lexer tab
2023/12/29
+ Release cuda_git_blame v1.5.0 Bug fixes
2023/12/24
+ Release cuda_git_blame v1.4.0 Allow modify datetime format via config file