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\Http\Controllers; | |
use Illuminate\Http\Request; | |
use Route; | |
class LaraHelperController extends Controller | |
{ | |
public function getRoutes() { |
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
// Eduardo Aguad [email protected] | |
// Use: | |
// yarn add vee-validate | |
// import VeeValidate, {Validator} from 'vee-validate'; | |
// Validator.extend('rut', require('./VeeRutValidator')); | |
// <input type="text" name="rut" v-validate="rut"> | |
module.exports = { |
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 | |
class VueValetDriver extends ValetDriver | |
{ | |
static $publicPath = 'public'; | |
static $startFile = 'public/index.html'; | |
/** | |
* Determine if the driver serves the request. | |
* |
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 | |
use Illuminate\Database\Schema\Blueprint; | |
use Illuminate\Database\Seeder; | |
use Illuminate\Support\Facades\Schema; | |
class RegionCommuneSeeder extends Seeder | |
{ | |
/** | |
* Run the database seeds. |
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 VeeValidate, { Validator } from 'vee-validate'; | |
* Validator.extend('rut', require('./VeeRutValidator')); | |
* Vue.use(VeeValidate); | |
*/ | |
module.exports = { | |
getMessage: (field, params, data) => `El campo ${field} no es un rut válido`, | |
validate: rut => { | |
if (typeof(rut) !== 'string') { |
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
#!/usr/bin/expect -f | |
# Filename: beanstalk-purge | |
# Usage: ./beanstalk-purge $HOST $PORT $QUEUE $HOW_MANY | |
# Example: ./beanstalk-purge 127.0.0.1 11300 default 3000 | |
set timeout 1 | |
spawn telnet [lindex $argv 0] [lindex $argv 1] | |
sleep 1 | |
send "use [lindex $argv 2]\n" | |
expect "USING" |
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
#!/bin/sh | |
# @author Eduardo Aguad <[email protected]> | |
cd /tmp | |
wget https://www.cloudflare.com/ips-v4 -O ips-v4-$$.tmp | |
wget https://www.cloudflare.com/ips-v6 -O ips-v6-$$.tmp | |
for cfip in `cat ips-v6-$$.tmp`; do ufw allow from $cfip to any port 443 proto tcp; done | |
for cfip in `cat ips-v4-$$.tmp`; do ufw allow from $cfip to any port 443 proto tcp; done |
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
#!/bin/sh | |
# @author Eduardo Aguad <[email protected]> | |
curl -L https://forge.laravel.com/ips-v4.txt | xargs -n 1 -I {} ufw allow from {} to any port 22 proto tcp; |
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
<a href="http://www.unnuevofuturo.cl/" target="_blank" style=" | |
margin: 20px; | |
box-sizing: border-box; | |
background-color: #f0f0f0; | |
background-image: url(http://www.eligeeducar.cl/wp-content/uploads/2018/11/cover.png); | |
background-size: contain; | |
background-position: center; | |
display: block; | |
background-repeat: no-repeat; | |
"><img src="http://www.eligeeducar.cl/wp-content/uploads/2018/11/cover.png" style=""></a> |
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
#!/bin/bash | |
# Creator: Phil Cook | |
# Modified: Andy Miller | |
# Modified: Eduardo Aguad | |
brew_prefix=$(brew --prefix | sed 's#/#\\\/#g') | |
brew_array=("5.5","5.6","7.0","7.1","7.2", "7.3") | |
php_array=("[email protected]" "[email protected]" "[email protected]" "[email protected]" "[email protected]" "[email protected]") | |
valet_support_php_version_array=("[email protected]" "[email protected]" "[email protected]" "[email protected]" "[email protected]" "[email protected]") | |
php_installed_array=() |
OlderNewer