Add the following snippet at the bottom of ~/.zshrc file.
RPROMPT='[%D{%L:%M:%S}] '$RPROMPT
| #!/bin/sh | |
| # Alpine PHP 8.3 installation and configuration script | |
| # Run as root | |
| set -e | |
| # ------------------------------- | |
| # Install PHP 8.3 + common extensions | |
| # ------------------------------- | |
| install_php() { |
| #!/bin/sh | |
| # Alpine Linux Server Enhancement Script | |
| # Structured with functions | |
| # Run as root | |
| set -e | |
| # ------------------------------- | |
| # Update & upgrade system | |
| # ------------------------------- |
| #!/bin/bash | |
| # ================================ | |
| # 🛡️ MySQL Backup & Restore Tool 🛡️ | |
| # ------------------------------- | |
| # - Configurable via CLI or file 📄 | |
| # - Upload/download to/from S3 ☁️ | |
| # - Super cool messages 🚀 | |
| # ================================ |
| # Base Image | |
| FROM php:7.4-fpm-alpine | |
| # Update system packages | |
| RUN apk update && apk upgrade | |
| # Install required pacjages | |
| RUN apk add --no-cache nano vim nginx composer supervisor npm git htop \ | |
| bzip2-dev zlib-dev libpng icu-dev libxml2-dev \ | |
| freetype libpng libjpeg-turbo freetype-dev libpng-dev libjpeg-turbo-dev gettext-dev \ |
| javascript: (function() { | |
| var newSS, styles = '* { background: #282b2e ! important; color: #e0e2e4 !important } :link, :link * { color: #2868C7 !important } :visited, :visited * { color: #dddddd !important }'; | |
| if (document.createStyleSheet) { | |
| document.createStyleSheet("javascript:'" + styles + "'"); | |
| } else { | |
| newSS = document.createElement('link'); | |
| newSS.rel = 'stylesheet'; | |
| newSS.href = 'data:text/css,' + escape(styles); | |
| document.getElementsByTagName("head")[0].appendChild(newSS); | |
| } |
| { | |
| "shell_cmd": "php-cs-fixer fix --rules=@Symfony,array_indentation --using-cache=false $file", | |
| "file_regex": "php$" | |
| } |
| <?php | |
| namespace App\Http\Controllers; | |
| use Illuminate\Http\Request; | |
| class GoogleSheetController extends Controller | |
| { | |
| protected $sheets; |
| <?php | |
| public function sampleArrayPaginator(Request $request) { | |
| $response = array(); | |
| $page = ($request->has('page')) ? intval($request->page) : 1; | |
| $size = ($request->has('size')) ? intval($request->size) : 10; | |
| $collection = collect($response); | |
| $total = $collection->count(); | |
| return new LengthAwarePaginator( | |
| array_values($collection->forPage($page, $size)->toArray()), | |
| $collection->count(), |
| <?php | |
| /** | |
| * Tracking package via cURL from www.dawnwing.co.za | |
| * | |
| * @author Kundan K Singh <kundandeveloper@gmail.com> | |
| */ | |
| define('DOMAIN_REQUEST_URL', 'http://www.dawnwing.co.za/business-tools/online-parcel-tracking/'); | |
| include_once 'simple_html_dom.php'; |