In Git you can add a submodule to a repository. This is basically a repository embedded in your main repository. This can be very useful. A couple of usecases of submodules:
- Separate big codebases into multiple repositories.
| #!/bin/bash | |
| # Target date in seconds since epoch (May 29, 2025, 13:42 GMT+7) | |
| TARGET_DATE=$(date -d "2025-05-29 13:42:00 +0700" +%s) | |
| # Check if we have permission to read journal | |
| if ! journalctl --list-boots >/dev/null 2>&1; then | |
| echo "Error: Cannot access journal. You may need to run this script with sudo or be in the 'adm' or 'systemd-journal' group." | |
| exit 1 | |
| fi |
| """Module for handling authentication, interactions with Firebase and JWT cookies. | |
| This solution is refactored from the ‘streamlit_authenticator’ package . It leverages JSON | |
| Web Token (JWT) cookies to maintain the user’s login state across browser sessions. For the | |
| backend, It uses Google’s Firebase Admin Python SDK. This solution ensures that the content | |
| of the page and user settings panel are only displayed if the user is authenticated. Similarly, | |
| the login page can only be accessed if the user is not authenticated. Upon registration, the | |
| user is sent a verification link to their e-mail address. | |
| Important - to make this app run, put the following variables in your secrets.toml file: | |
| COOKIE_KEY - a random string key for your passwordless reauthentication |
| """ | |
| This script was used to create the figures for http://jrsmith3.github.io/sample-logs-the-secret-to-managing-multi-person-projects.html from a PDF file containing some old CMU sample logs. | |
| """ | |
| import PyPDF2 | |
| from wand.image import Image | |
| import io | |
| import os |
| #!/usr/bin/env python | |
| """ Short description of this Python module. | |
| Longer description of this module. | |
| This program is free software: you can redistribute it and/or modify it under | |
| the terms of the GNU General Public License as published by the Free Software | |
| Foundation, either version 3 of the License, or (at your option) any later | |
| version. |
Please see How to Minikube
$ minikube start --cpus 4 --memory 8192This is a special note after my painful trials with NVIDIA driver+CUDA+cuDNN installation on Ubuntu 20.04 LTS because they have some different update w.r.t Ubuntu 18.04. In particular, the aim is to install the following pieces of software:
At the time of writing (2022-May-15), the NVIDIA driver v510.68.02 is the lastest version. My earlier note was moved to achieve because it is outdated on Ubuntu 20.04.
See how a minor change to your commit message style can make a difference. Examples
Have a look at CLI util git-conventional-commits to ensure this conventions and generate changelogs
| #!/bin/bash | |
| # THIS FILE WILL REQUIRES SUDO | |
| # NOTE: Use <full path>, dont use ~/ to point to home, since it will point to /root/ if you use `sudo` | |
| # or if you are currently the `root` user, IDK. | |
| # Set your OpenCV install prefix path for CMake here | |
| OPENCV_PREFIX_PATH=/home/cuong/compiled_libraries | |
| OPENCV_DOWNLOAD_LINK=https://github.com/opencv/opencv/archive/4.5.1.zip | |
| OPENCV_CONTRIB_DOWNLOAD_LINK=https://github.com/opencv/opencv_contrib/archive/4.5.1.zip |
| #!/bin/bash | |
| echo "---------------------" | |
| echo "Installing ffmpeg ..." | |
| echo "---------------------" | |
| cd /root/Desktop/ | |
| git clone git://source.ffmpeg.org/ffmpeg.git ffmpeg | |
| cd ffmpeg | |
| ./configure | |
| make | |
| make install |