Look at one of the following topics to learn more
Basic packages to install
#Ssh | |
ssh-keygen -t ed25519 -C "<comment>" | |
#PHP | |
sudo apt install php8.1-cli | |
#Tools | |
sudo apt -y install sysstat htop zsh apt tig git vim curl unzip p7zip unrar composer npm nodejs | |
#Zsh |
#!/bin/bash | |
CURRENT_BRANCH=`git rev-parse --abbrev-ref HEAD` | |
git checkout master && git pull --prune --all && git branch --merged | grep -vE "^\*|master" | xargs -r git branch -d | |
git checkout $CURRENT_BRANCH |
#System setup | |
sudo visudo //remove ask for password for wheel users | |
#Install vim | |
sudo dnf -y install vim | |
#Use fast mirror | |
sudo echo 'fastestmirror=true' >> /etc/dnf/dnf.conf | |
#Disable firewall |
class User extends Authenticatable implements MustVerifyEmail | |
{ | |
use Notifiable; | |
const SLACK_CHANNEL_WWW = 'xxx'; | |
const SLACK_CHANNEL_BACKEND = 'xxx'; | |
protected $slackChannels= [ | |
self::SLACK_CHANNEL_WWW, | |
self::SLACK_CHANNEL_BACKEND, |
[user] | |
name = xxx | |
email = [email protected] | |
[core] | |
whitespace = trailing-space,space-before-tab | |
editor = vim | |
[diff] | |
renames = copy | |
[color] | |
diff = auto |
using (var connection = HeroukoPostgresql) | |
{ | |
var watch = System.Diagnostics.Stopwatch.StartNew(); | |
connection.Open(); | |
var trans = connection.BeginTransaction(); | |
try | |
{ | |
ExecuteNonQuery("TRUNCATE xxx", connection); |
public class NaturalSortComparer : IComparer<string>, IDisposable | |
{ | |
private bool isAscending; | |
public NaturalSortComparer(bool inAscendingOrder = true) | |
{ | |
this.isAscending = inAscendingOrder; | |
} | |
public int Compare(string x, string y) |
export PS1="________________________________________________________________________________\n| \w @ \h (\u) \n| => " | |
export PS2="| => " | |
export CLICOLOR=1 | |
export LSCOLORS=ExFxBxDxCxegedabagacad | |
zipf () { zip -r "$1".zip "$1" ; } | |
# extract: Extract most know archives with one command | |
# --------------------------------------------------------- |
<?php | |
use Illuminate\Console\Command; | |
use Illuminate\Filesystem\Filesystem; | |
class ViewsCommand extends Command { | |
/** | |
* The console command name. | |
* | |
* @var string |