Setup a folder inside a repo with a specific commit of that repo.
git worktree add [-f] [--detach] [--checkout] [--lock] [-b ] []
Setup a folder inside a repo with a specific commit of that repo.
git worktree add [-f] [--detach] [--checkout] [--lock] [-b ] []
| name | description |
|---|---|
Logging Best Practices |
Use before implementing logs in a medium to large scale production system. |
This skill is adpated from "Logging sucks. And here's how to make it better. by Boris Tane.
When helping with logging, observability, or debugging strategies, follow these principles:
| using System.Data.Common; | |
| using System.Runtime.CompilerServices; | |
| using System.Text; | |
| using Npgsql; | |
| GetCatalogItemsSql(null, null, null, 10); | |
| void GetCatalogItemsSql(int? catalogBrandId, int? before, int? after, int pageSize) | |
| { | |
| // This looks like it would be susceptible to SQL injection, but it's not. |
| package main | |
| import ( | |
| "bytes" | |
| "fmt" | |
| "io" | |
| "log" | |
| "mime/multipart" | |
| "net/http" | |
| "os" |
Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.
System: Debian/Ubuntu/Fedora. Might work for others as well.
As mentioned here, to update a go version you will first need to uninstall the original version.
To uninstall, delete the /usr/local/go directory by:
| # Path to your oh-my-zsh configuration. | |
| export ZSH=$HOME/.oh-my-zsh | |
| # Set name of the theme to load. | |
| # Look in ~/.oh-my-zsh/themes/ | |
| # Optionally, if you set this to "random", it'll load a random theme each | |
| # time that oh-my-zsh is loaded. | |
| #export ZSH_THEME="robbyrussell" | |
| export ZSH_THEME="zanshin" |
| Open File -> App\Providers\AppServiceProvider | |
| And change method boot | |
| public function boot() | |
| { | |
| config(['app.locale' => 'id']); | |
| Carbon::setLocale('id'); | |
| } | |
| Open File and changes -> config/app.php |