If you’ve ever set up a Rust development environment, you know the drill: install Rust, configure your toolchain, set up your editor, and manage dependencies. It can be a hassle, especially when working across different machines or collaborating with others. Enter ezRust, a lightweight Docker-based development environment for Rust that simplifies the process. What is… Continue reading ezRust: Fast Docker-Based Rust Development
Category: Programming
APIs: Why Rust’s Axum Leads Over Python’s FastAPI
In a real-world example, the difference between running a FastAPI container versus an Axum container is astonishing. The amount of memory and CPU usage for an API container that performs a series of complicated equations is astounding enough that future use cases of Python have to be seriously considered against why they should be used… Continue reading APIs: Why Rust’s Axum Leads Over Python’s FastAPI
Generating Code with AI? You Need To Learn SCM
Generating Code with AI? Use Git as SCM (Source Code Management)
Ubuntu/Debian Notification After Command Has Run
If you’re about to run a process that is going to take a considerable amount of time to execute, it is convenient to have that process run without your supervision. And having some type of notification as to when the process has finished executing… or throwing an error, is a big help. Luckily in Ubuntu,… Continue reading Ubuntu/Debian Notification After Command Has Run
Git; Get All Branches Last Commit Date and Time
for k in `git branch | perl -pe s/^..//`; do echo -e `git show –pretty=format:”%Cgreen%ci %Cblue%cr%Creset” $k — | head -n 1`\\t$k; done | sort -r The set of piped commands above produces easy-to-read output of all your repo’s branch names and their last commit dates. Below is an explanation of the commands: for k… Continue reading Git; Get All Branches Last Commit Date and Time
Count IP Occurrences in Apache / Nginx Logs
This command will parse an Apache or Nginx log file and print-out the 50 highest occurring IP’s, along with the number of occurrences, to the shell prompt. machine:~ User$ cat access.log | awk ‘{print $1}’ | sort -n | uniq -c | sort -nr | head -50 cat – reads the file access.log – is… Continue reading Count IP Occurrences in Apache / Nginx Logs
GIT Using SSH to Push Remote to Server
On the server terminal, type: git remote add origin ssh://[email protected]:22/home/user/remote.git The name of your remote repo will be ‘origin’. ‘user’ is your user name, ‘domian.com’ is your domain or IP address. ‘:22’ is the port number used to connect to your ssh server. ‘/home/user/remote.git’ is the location of your remote git repo. Before you push… Continue reading GIT Using SSH to Push Remote to Server
WordPress: change all url/websites address in posts
The SQL statement to change all references of a string in WordPress posts is: UPDATE wp_posts SET post_content = REPLACE(post_content, ‘staging.server.com’, ‘www.productionserver.com’);
Quickly Testing TTFB (Time To First Byte) with Apache Benchmarking Tool
Checking the cause of a high TTFB (Time To First Byte) can be time consuming. And pinpointing the issue requires multiple tests against even the smallest changes. Enter Apache’s Benchmarking Tool ab to help with quick testing. ab -n 100 http://www.website.com/ The above command will execute 100 tests against the website entered. The results are… Continue reading Quickly Testing TTFB (Time To First Byte) with Apache Benchmarking Tool
Pushing Large Git Repository
Pushing a large Git Repository can cause issues; time-outs, disconnects or general freezing tend to happen with especially large Git Repos. The best way to handle pushing those large git repos is to break the pushes down into commit chunks. Using git log you can decide how far back and how many chunks you would… Continue reading Pushing Large Git Repository