Skip to content

Instantly share code, notes, and snippets.

View edwinheij's full-sized avatar
😊
Keep smiling

Edwin Heij edwinheij

😊
Keep smiling
View GitHub Profile
@rubenvanassche
rubenvanassche / tests.yml
Last active September 23, 2024 12:08
A simple Laravel testing workflow for GitHub Actions
name: Tests (PHP)
on: [push]
jobs:
tests:
name: Run tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
[xdebug]
# Using https://github.com/w00fz/xdebug-osx/ so don't add `zend_extension` entry, as it would be duplicate
# https://xdebug.org/docs/all_settings
xdebug.remote_port=9001
xdebug.remote_enable=1
xdebug.remote_autostart=1
xdebug.remote_connect_back=1
xdebug.var_display_max_depth=-1
xdebug.var_display_max_children=-1
xdebug.var_display_max_data=-1
@avataru
avataru / EloquentCheatSheet.md
Last active April 18, 2025 21:40
Eloquent relationships cheat sheet

Real-time Grid Component with Laravel, Vue.js, Vuex & Socket.io (Google Docs-like Functionality)

Motivation

The exercise of writing this tutorial -- as well as recording it as a screencast -- has helped me better understand the concepts behind a couple of my favorite open source tools. Both the tutorial and screencast will be of personal use in the future as references. If they are of help to others, that will be great too.

I love Google Docs' real-time, multi-user interactive capability, and I've have always been a fan of spreadsheets. I wanted to see if I could replicate that type of functionality. What I've done is taken the basic Vue.js Grid Component example and altered it a bit so that when a user clicks on a cell, that cell becomes highlighted or "active", not just in the user's browser but in any browser instance cur

@taylorotwell
taylorotwell / global-homestead.sh
Created September 23, 2015 21:40
Global Homestead Without Composer
alias homestead='function __homestead() { (cd ~/Documents/Code/Homestead && vagrant $*); unset -f __homestead; }; __homestead'
# Usage
homestead up
homestead halt
# etc...
@visamz
visamz / baciuzzi_queue.conf
Last active March 27, 2020 06:44
Beanstalkd and Supervisor Config. For CentOS, a modified /etc/init.d/beanstlkd file which creates a pid file in /var/run/beanstalkd.pid
[program:baciuzzi_queue]
directory=/data2/www/baciuzzi
command=php artisan queue:listen --tries=3
stdout_logfile=/data2/www/baciuzzi/app/storage/logs/supervisor.log
stdout_logfile_maxbytes=1MB
stdout_logfile_backups=10
stdout_capture_maxbytes=1MB
stderr_logfile=/data2/www/baciuzzi/app/storage/logs/supervisor_error.log
stderr_logfile_maxbytes=1MB
stderr_logfile_backups=10
@koomai
koomai / PhpStorm Keyboard Shortcuts.md
Last active September 14, 2024 00:46
Frequently Used PhpStorm Keyboard Shortcuts

Note: Some of these shortcuts have been remapped for my own convenience (Preferences->Keymap). These are Mac shortcuts, just use the Windows/Linux equivalent of the Cmd/Option/Ctrl/Del keys.

####Search, Go to, Navigation ####

Cmd + P - Search file

Cmd + Shift + O - Search everywhere

(I swapped the above two recently because I use Cmd + P to search for files most of the time).

@barryvdh
barryvdh / _ide_helper.php
Last active December 16, 2024 10:25
Laravel IDE Helper for Netbeans / PhpStorm / Sublime Text 2 CodeIntel, generated using https://github.com/barryvdh/laravel-ide-helper
<?php
/**
* A helper file for Laravel 5, to provide autocomplete information to your IDE
* Generated for Laravel 5.5.13 on 2017-09-28.
*
* @author Barry vd. Heuvel <[email protected]>
* @see https://github.com/barryvdh/laravel-ide-helper
*/
namespace {
exit("This file should not be included, only analyzed by your IDE");
@JeffreyWay
JeffreyWay / laravel.js
Last active October 9, 2024 03:43
Want to send a DELETE request when outside of a form? This will handle the form-creation bits for you dynamically, similar to the Rails implementation. (Requires jQuery, but doesn't have to.) To use, import script, and create a link with the `data-method="DELETE"` attribute.
/*
<a href="posts/2" data-method="delete"> <---- We want to send an HTTP DELETE request
- Or, request confirmation in the process -
<a href="posts/2" data-method="delete" data-confirm="Are you sure?">
*/
(function() {
@kyledecot
kyledecot / laravel-ujs.js
Created June 19, 2012 14:40
laravel UJS
(function($, undefined) {
// Shorthand to make it a little easier to call public laravel functions from within laravel.js
var laravel;
$.laravel = laravel = {
// Link elements bound by jquery-ujs
linkClickSelector: 'a[data-confirm], a[data-method], a[data-remote], a[data-disable-with]',
// Select elements bound by jquery-ujs
inputChangeSelector: 'select[data-remote], input[data-remote], textarea[data-remote]',