Skip to content

Instantly share code, notes, and snippets.

View soyHouston256's full-sized avatar
🏠
Working from home

Max Houston Ramirez Martel soyHouston256

🏠
Working from home
View GitHub Profile
@soyHouston256
soyHouston256 / gist:e589bc748f91ddaf3ee92b0f007c0df2
Last active September 13, 2019 17:13
Ignorar Mayúsculas o minúsculas al consultar un modelo de laravel
$name = $args["name"];
User::whereRaw('LOWER(name) LIKE (?) ',["%{$name}%"]);
@soyHouston256
soyHouston256 / gist:e1cfc286a400f0ee88c8fa8348e6a790
Last active September 13, 2019 17:05
pasar parametro en mayusculas
//Si tus datos estan en mayúsculas
$patient = patient::where('name','like','%'.strtoupper($args["name"]).'%')->first();
//Si tus datos estan en mínúsculas
$patient = patient::where('name','like','%'.strtolower($args["name"]).'%')->first();
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=laravel
DB_USERNAME=root
DB_PASSWORD=
DB_CONNECTION=pgsql
DB_HOST=127.0.0.1
DB_PORT=5432
DB_DATABASE=dabase
DB_USERNAME=
DB_PASSWORD=
version: '3'
services:
postgres:
image: postgres:10
environment:
POSTGRES_PASSWORD: postgres
PGDATA: /data/postgres
volumes:
- ./postgres:/data/postgres
ports:
DB_CONNECTION=pgsql
DB_HOST=127.0.0.1
DB_PORT=5439
DB_DATABASE=encargo
DB_USERNAME=postgres
DB_PASSWORD=postgres
@soyHouston256
soyHouston256 / postgres-brew.md
Created October 21, 2020 05:14 — forked from ibraheem4/postgres-brew.md
Installing Postgres via Brew (OSX)

Installing Postgres via Brew

Pre-Reqs

Brew Package Manager

In your command-line run the following commands:

  1. brew doctor
  2. brew update
@soyHouston256
soyHouston256 / install_phpzip.md
Created October 21, 2020 15:51 — forked from yehgdotnet/install_phpzip.md
MAMP PRO for Mac OSX - Installing PHP ZIP extension

From Terminal

# install dependencies
brew install autoconf # required by pecl 
brew install libzip


# install zip extenion in your selected MAMP PHP version 
ls /Applications/MAMP/bin/php/
A)Un joven muy afortunado logró ganar el primer premio de la lotería... exacto, estamos hablando de l pobre al que cofla le
dio una mano, este pobre decide hacer una fiesta para festejar que salió de la pobreza
con este millonario compró una maquina que deja pasar solamente a los mayores de edad, entre otras cosas....
- Dejar pasar solo a los mayores de edad.
- La primer persona que entre despues de las 2AM, no paga.
let free = false
const validarCliente = (time)=>{
let edad = prompt("¿Cuál es tu edad?")
if(edad>18){
def es_palindromo(palabra):
palabra = palabra.replace(' ', '').lower()
if palabra == palabra[::-1]:
return True
else: