Skip to content

Instantly share code, notes, and snippets.

View sineld's full-sized avatar
🏢
Full Stack Developer

Sinan Eldem sineld

🏢
Full Stack Developer
View GitHub Profile
@yelocode
yelocode / Calendar.php
Created November 6, 2023 14:33
Full Calendar JS Livewire example
<?php
namespace App\Livewire;
use App\Models\Event;
use Carbon\Carbon;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Validator;
use Livewire\Attributes\Rule;
use Livewire\Component;
@calebporzio
calebporzio / caps_lock_to_command_escape.json
Last active November 24, 2022 19:54
A Karabiner-Elements complex modification rule
{
"title": "Caps Lock To Command/Escape",
"author": "Caleb Porzio(calebporzio.com)",
"homepage": "https://gist.github.com/calebporzio/2d07cd0e3013e7eaf16f5a2ea4f594ae",
"import_url": "karabiner://karabiner/assets/complex_modifications/import?url=https://gist.githubusercontent.com/calebporzio/2d07cd0e3013e7eaf16f5a2ea4f594ae/raw/08c397b09fbaa5ec90cf161e5bca97bdb43e8c55/caps_lock_to_command_escape.json",
"rules": [
{
"description": "Caps Lock to Command/Escape",
"manipulators": [
{
@laravel-shift
laravel-shift / .php-cs-fixer.php
Last active April 9, 2024 14:08
PHP CS Fixer - Laravel Coding Style Ruleset
<?php
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
$rules = [
'array_indentation' => true,
'array_syntax' => ['syntax' => 'short'],
'binary_operator_spaces' => [
'default' => 'single_space',
@jakebathman
jakebathman / logslaravel.sh
Created August 19, 2018 00:06
Tail Laravel logs and filter out the stack traces
tail -f -n 450 storage/logs/laravel*.log \
| grep -i -E \
"^\[\d{4}\-\d{2}\-\d{2} \d{2}:\d{2}:\d{2}\]|Next [\w\W]+?\:" \
--color
@calebporzio
calebporzio / HasUuid.php
Created July 5, 2018 17:36
A little trait to add to models that will have Uuids
<?php
// Example usage in a model:
class ExampleModel extends Model
{
use HasUuid;
protected $primaryKey = 'uuid';
function ydl()
{
youtube-dl --extract-audio --audio-format mp3 "$@" --ignore-errors
}
# youtube-dl: https://rg3.github.io/youtube-dl/
# ornek: ydl "https://www.youtube.com/playlist?list=PL55713C70BA91BD6E"
@javymarmol
javymarmol / LC_CTYPE.txt
Created November 20, 2017 21:52
Centos warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory
vi /etc/environment
add these lines...
LANG=en_US.utf-8
LC_ALL=en_US.utf-8
@poul-kg
poul-kg / valet.conf
Last active October 23, 2023 10:48
CORS Rules for Laravel Valet Nginx
# To enable CORS you should add lines with CORS rules below to your valet.conf file
# Find the file /usr/local/etc/nginx/valet/valet.conf - this is Valet conf for Nginx
# of try to execute `locate valet.conf` and find the `valet.coinf` in `nginx` subdirectory
# after you edit your valet.conf do not forget to execute `valet restart`
server {
listen 80 default_server;
root /;
charset utf-8;
client_max_body_size 128M;
@nckg
nckg / InputEdit.vue
Created June 13, 2017 14:00
Vue Inline edit
<template>
<div>
<span v-show="!editing"
@click="toggleEdit" v-html="showValue"></span>
<div v-show="editing" class="row">
<div class="col-md-10">
<div class="form-group">
<textarea class="form-control"
rows="3"