Skip to content

Instantly share code, notes, and snippets.

View osbre's full-sized avatar
🇺🇦
#StandWithUkraine

Ostap Brehin osbre

🇺🇦
#StandWithUkraine
View GitHub Profile
@sutnistj
sutnistj / main.md
Last active May 22, 2024 12:00
Latinka

Зроблено за проханнями.

Абетка

Кирилиця Латиниця Кирилиця Латиниця Кирилиця Латиниця
А а A a Я я Ja ja
Б б B b
В в V v
Г г H h
@lepikhinb
lepikhinb / .aliases
Created October 1, 2022 23:23
Bash aliases for common commands
# Git
alias wip="git add .; git commit -m 'wip'"
alias push="git push"
# PHP
alias c="composer"
alias pest='./vendor/bin/pest'
alias pint='./vendor/bin/pint'
alias stan='./vendor/bin/phpstan'
@lepikhinb
lepikhinb / vite-watcher-runner.ts
Last active December 26, 2022 21:27
Vite plugin to run custom commands on file changes
// the plugin requires a `minimatch` dependency installed
// npm i -D minimatch
import { PluginOption } from "vite"
import { exec } from "child_process"
import minimatch from "minimatch"
import path from "path"
import chalk from "chalk"
export default function watch(config: {
<?php
/**
* Title: Content-only Test
* Slug: prefix/content-only-test
*/
?>
<!-- wp:group {"templateLock": "contentOnly", "align":"wide","layout":{"type":"constrained","wideSize":"2000px"}} -->
<div class="wp-block-group alignwide"><!-- wp:columns -->
<div class="wp-block-columns"><!-- wp:column -->
<div class="wp-block-column"><!-- wp:image {"id":231,"sizeSlug":"large","linkDestination":"none"} -->
@rdh27785
rdh27785 / openssl.cnf.diff
Created May 4, 2022 02:42
diff -uN /etc/ssl/openssl.cnf\~original /etc/ssl/openssl.cnf for Nextcloud with OpenSSL 3
--- /etc/ssl/openssl.cnf~original 2022-03-16 08:35:51.000000000 +0000
+++ /etc/ssl/openssl.cnf 2022-05-04 02:37:30.336530711 +0000
@@ -56,6 +56,7 @@
# List of providers to load
[provider_sect]
default = default_sect
+legacy = legacy_sect
# The fips section name should match the section name inside the
# included fipsmodule.cnf.
# fips = fips_sect
@yajra
yajra / console.php
Created April 22, 2022 02:12
Disable Laravel migrate:fresh command
Artisan::command('migrate:fresh', function () {
/** @var \Illuminate\Console\Command $cmd */
$cmd = $this;
$cmd->ask("Are you sure you want to resign?", "Yes");
$cmd->comment(
<<<'TXT'
.~))>>
@juno-w
juno-w / upgrade-alpine-v3.md
Created June 15, 2021 09:33
Update Livewire and Alpine.js V3 on Laravel Jetstream.

Step 1

Set to at least v3.0.6 and make sure Livewire is updated to v2.5.0

Run artisan vendor:publish --force --tag=livewire:assets --ansi to publish new assets.

Ignore if you have set auto publish at the composer's post-autoload-dump section.

Update the Alpine.js version.

@lukaskleinschmidt
lukaskleinschmidt / HandleInertiaRequests.php
Last active July 1, 2024 09:18
inertia-laravel multiple root views
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Http\Request;
use Inertia\Middleware;
class HandleInertiaRequests extends Middleware
{
@freekmurze
freekmurze / 2021_02_17_103523_migrate_to_jetstream.php
Last active June 11, 2022 19:55
Migrate classic Spark tables to Jetstream + new Spark
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class MigrateToJetstream extends Migration
{
public function up()
{