Skip to content

Instantly share code, notes, and snippets.

View mantrax314's full-sized avatar

Daniel Saavedra mantrax314

View GitHub Profile
@jeffochoa
jeffochoa / Response.php
Last active November 13, 2024 14:18
Laravel HTTP status code
<?php
// This can be found in the Symfony\Component\HttpFoundation\Response class
const HTTP_CONTINUE = 100;
const HTTP_SWITCHING_PROTOCOLS = 101;
const HTTP_PROCESSING = 102; // RFC2518
const HTTP_OK = 200;
const HTTP_CREATED = 201;
const HTTP_ACCEPTED = 202;
@agarzon
agarzon / phplint.sh
Last active October 4, 2017 21:21
Recursive PHP linting
find . -name "*.php" -print0 | xargs -0 -n1 -P $(nproc) php -l | grep -v '^No'
@agarzon
agarzon / install-php-tools.sh
Last active October 27, 2021 03:48
Install globally popular PHP dev tools like composer, phpunit, phpcs, phpmd, phpcpd, deployer, robo, codeception, etc.
#!/bin/bash
#To execute it directly: sudo bash <(curl -s https://gist.githubusercontent.com/agarzon/ecb0b92d4c8e1bbde126534c76721a58/raw/install-php-tools.sh)
BIN_PATH=/usr/local/bin/
#COMPOSER
sudo curl -LsS https://getcomposer.org/composer.phar -o ${BIN_PATH}composer
sudo chmod a+x ${BIN_PATH}composer
@jwalton512
jwalton512 / admin(v2).js
Last active May 15, 2018 19:41
Harmony with Laravel + Vue + Vue Router
// dashboard component
var dashboard = Vue.extend({
template: '<p>Hello from dashboard</p>'
})
// user management component
var user = Vue.extend({
template: '<p>Hello from user management page</p>'
})