Configure octane laravel/octane
Install swoole extension (place in corresponding .ini file(s)):
pecl install swoole| #!/bin/bash | |
| export DEBIAN_FRONTEND=noninteractive | |
| set -e | |
| echo 'Fetch packages....' | |
| sudo apt-get update -q | |
| echo 'Perform upgrade....' | |
| sudo apt-get -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" -y upgrade |
| declare -A colors | |
| #curl www.bunlongheng.com/code/colors.png | |
| # Reset | |
| colors[Color_Off]='\033[0m' # Text Reset | |
| # Regular Colors | |
| colors[Black]='\033[0;30m' # Black | |
| colors[Red]='\033[0;31m' # Red | |
| colors[Green]='\033[0;32m' # Green |
| #!/bin/bash | |
| sudo apt-get autoremove -y; | |
| sudo apt-get autoclean -y; | |
| sudo updatedb; | |
| sync; echo 1 > /proc/sys/vm/drop_caches | |
| sudo reboot -h now; |
| #!/bin/bash | |
| # Sample script written for Part 4 of the RHCE series | |
| # This script will return the following set of system information: | |
| # -Hostname information: | |
| echo -e "\e[31;43m***** HOSTNAME INFORMATION *****\e[0m" | |
| hostnamectl | |
| echo "" | |
| # -File system disk space usage: | |
| echo -e "\e[31;43m***** FILE SYSTEM DISK SPACE USAGE *****\e[0m" |
| $tables = collect(Schema::getAllTables())->pluck('Tables_in_pmp'); | |
| $softdeletes = []; | |
| foreach ($tables as $table) { | |
| if (Schema::hasColumn($table, 'deleted_at')) { | |
| $softdeletes[$table] = DB::table($table)->whereNotNull('deleted_at')->count(); | |
| } | |
| } |
| public function generateRelationsQuery($request, $db_query, $model, $filter_relations) | |
| { | |
| $filter_appends = []; | |
| foreach ($filter_relations as $key => $value) { | |
| if (!isset($value['custom_query'])) { | |
| if ($request->has('filter-remote-' . strtolower($key))) { | |
| $select_value = $request->input('filter-remote-' . strtolower($key)); | |
| if (!empty($select_value)) { | |
| $filter_appends['filter-remote-' . strtolower($key)] = $select_value; |
| select | |
| first_name, | |
| last_name | |
| from | |
| users | |
| left join | |
| companies on companies.id = users.company_id | |
| where ( | |
| companies.name like 'TERM%' or | |
| first_name like 'TERM%' or |
| $schema = collect(DB::connection()->getDoctrineSchemaManager()->listTableNames())->map(function ($item, $key) { | |
| return [ | |
| 'name' => $item, | |
| 'colomns' => DB::getSchemaBuilder()->getColumnListing($item) | |
| ]; | |
| }); |
Configure octane laravel/octane
Install swoole extension (place in corresponding .ini file(s)):
pecl install swooleA Pen by Robert Fridzema on CodePen.