This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
podman run --pull newer --detach --security-opt label=type:container_runtime_t --replace --device /dev/kfd --device /dev/dri -v ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama:rocm; podman run --replace --pull newer -d --network=host -v open-webui:/app/backend/data -e OLLAMA_BASE_URL=http://127.0.0.1:11434 --name open-webui --restart always ghcr.io/open-webui/open-webui:main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Livewire; | |
use Livewire\Attributes\Url; | |
use Livewire\Component; | |
use WP_Query; | |
class PostSearch extends Component | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
faqih@shinobi:~$ sudo apt-get update | |
faqih@shinobi:~$ sudo apt-get upgrade | |
faqih@shinobi:~$ sudo service packagekit restart | |
faqih@shinobi:~$ sudo apt-get update --fix-missing | |
faqih@shinobi:~$ sudo apt install software-properties-common | |
faqih@shinobi:~$ sudo add-apt-repository ppa:ondrej/php | |
faqih@shinobi:~$ sudo apt update |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { defineConfig } from 'vite'; | |
import laravel from 'laravel-vite-plugin'; | |
export default defineConfig({ | |
plugins: [ | |
laravel({ | |
input: 'resources/js/app.jsx', | |
refresh: [ | |
'resources/js/app.jsx', | |
'front-end-client/src/**', | |
'resources/components/react.blade.php', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
declare(strict_types=1); | |
namespace App\DataTransferObjects; | |
use Carbon\CarbonImmutable; | |
use Spatie\DataTransferObject\Caster; | |
class CarbonImmutableCaster implements Caster |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const webpackCommonConfig = require("./webpack.config"); | |
const { merge } = require('webpack-merge'); | |
const TerserPlugin = require('terser-webpack-plugin'); | |
const MiniCssExtractPlugin = require('mini-css-extract-plugin'); | |
const { trimEnd } = require('lodash'); | |
module.exports = merge(webpackCommonConfig, { | |
mode: 'production', | |
devtool: 'source-map', | |
optimization: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Bootstrap any application services. | |
* | |
* @return void | |
*/ | |
public function boot() | |
{ | |
Component::macro('notify', function ($message, $title = '', $type = 'success') { | |
$this->dispatchBrowserEvent('notify', ['message' => $message, 'title' => $title, 'type' => $type]); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#### Enable Apache Proxy related modules | |
sudo a2enmod proxy | |
sudo a2enmod proxy_http | |
sudo a2enmod proxy_ajp | |
sudo a2enmod rewrite | |
sudo a2enmod deflate | |
sudo a2enmod headers | |
sudo a2enmod proxy_balancer | |
sudo a2enmod proxy_connect |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Get the discount details of given product with custom price | |
* @param $price float/integer | |
* @param $product object (Product object Example: wc_get_product($product_id)) | |
* @param $quantity int | |
* @param $custom_price float/integer (0 for calculate discount from product price) | |
* @param $return_details string (Default value 'discounted_price' accepted values = 'discounted_price','all') | |
* @param $manual_request boolean (Default value false: pass this as true for get discount even if there is no item in cart) | |
* @param $is_cart boolean (Default value true) | |
* @return array|float|int - is product has no discounts, returns $price;else return array of discount details based on $return_details |
NewerOlder