These learning resources primarily focus on Test Driven Development (TDD).
- There is an emphasis on learning using PHP, Laravel and PHPUnit.
- All these resources are free (at the time of writing)
| <?php | |
| function encrypt_mcrypt($msg, $key, $iv = null) { | |
| $iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC); | |
| if (!$iv) { | |
| $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND); | |
| } | |
| $pad = $iv_size - (strlen($msg) % $iv_size); | |
| $msg .= str_repeat(chr($pad), $pad); | |
| $encryptedMessage = mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $key, $msg, MCRYPT_MODE_CBC, $iv); | |
| return base64_encode($iv . $encryptedMessage); |
| ## 安裝語系檔 | |
| `$ sudo locale-gen "en_US.UTF-8"` | |
| ## 重新設定語系檔 | |
| `$ sudo dpkg-reconfigure locales` | |
| ## 設定檔 |
| // | |
| // _oo0oo_ | |
| // o8888888o | |
| // 88" . "88 | |
| // (| -_- |) | |
| // 0\ = /0 | |
| // ___/`---'\___ | |
| // .' \\| |// '. | |
| // / \\||| : |||// \ | |
| // / _||||| -:- |||||- \ |
I had a bit of trouble trying to configure permissions to upload files from my Google Compute Engine instance to my Google Cloud Storage bucket. The process isn't as intuitive as you think. There are a few permissions issues that need to be configured before this can happen. Here are the steps I took to get things working.
Let's say you want to upload yourfile.txt to a GCS bucket from your virtual machine.
You can use the gsutil command line tool that comes installed on all GCE instances.
If you've never used the gcloud or gsutil command line tools on this machine before, you will need to initialize them with a service account.
ANSI escape sequences can be printed to a shell to as instructions. The below is a list of codes I have used often in my CLI programs and I find myself looking up over and over again.
A great article about it can be found here.
When you're running multiple Claude Code sessions — and you will be — the default experience gives you nothing. Every chat looks the same. You don't know what each one is doing. You don't know how much context is left before degradation kicks in. You don't know if you're about to hit your quota ceiling.
This statusline fixes that. One glance tells you what you're working on, where you stand, and whether you should wrap up. Each session is visually distinct. Nothing to configure, nothing to maintain.