Skip to content

Instantly share code, notes, and snippets.

View evertramos's full-sized avatar
🐳
Automating things!

Evert R. evertramos

🐳
Automating things!
View GitHub Profile
@evertramos
evertramos / CaddyController.php
Created February 5, 2022 11:55 — forked from gilbitron/CaddyController.php
Enabling HTTPS (SSL) for Laravel Sail using Caddy
<?php
# app/Http/Controllers/CaddyController.php
namespace App\Http\Controllers;
use App\Store;
use Illuminate\Http\Request;
class CaddyController extends Controller
{
@evertramos
evertramos / bash-colors.md
Created January 28, 2022 12:19 — forked from iamnewton/bash-colors.md
The entire table of ANSI color codes.

Regular Colors

Value Color
\e[0;30m Black
\e[0;31m Red
\e[0;32m Green
\e[0;33m Yellow
\e[0;34m Blue
\e[0;35m Purple
@evertramos
evertramos / ext.txt
Created February 3, 2020 18:06 — forked from chronon/ext.txt
List of docker-php-ext-install extension names
Possible values for ext-name:
bcmath
bz2
calendar
ctype
curl
dba
dom
enchant
@evertramos
evertramos / Filter.php
Created July 25, 2019 14:41 — forked from szabomikierno/Filter.php
Filter trait for any Laravel Model
<?php
namespace App\Core\Model;
/**
* FILTER QUERY PARAMS
*
* @param (boolean) active
* The returned resources active (deleted_at) status

PostgreSQL

Backup

docker exec -u <your_postgres_user> <postgres_container_name> pg_dump -Fc <database_name_here> > db.dump

Restore

docker exec -i -u   pg_restore -C -d  &lt; db.dump
@evertramos
evertramos / grafana custom.ini
Created August 17, 2018 10:28 — forked from mvadu/grafana custom.ini
nginx config for using grafana, Influxdb via reverse proxy with authentication
# The full public facing url
#root_url = %(protocol)s://%(domain)s:%(http_port)s/
root_url = http://localhost:80/grafana/
@evertramos
evertramos / deploy.sh
Created June 13, 2018 17:20 — forked from BenSampo/deploy.sh
Laravel deploy script
# Change to the project directory
cd /home/forge/domain.com
# Turn on maintenance mode
php artisan down
# Pull the latest changes from the git repository
git pull origin master
# Install/update composer dependecies
@evertramos
evertramos / GoogleDriveServiceProvider.php
Created April 30, 2018 15:32 — forked from sergomet/GoogleDriveServiceProvider.php
Setup a Laravel Storage driver with Google Drive API
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
class GoogleDriveServiceProvider extends ServiceProvider
{
/**
* Bootstrap the application services.
@evertramos
evertramos / add_two_times.js
Created January 18, 2018 17:21 — forked from joseluisq/add_two_times.js
Add two string time values (HH:mm:ss) with javascript
/**
* Add two string time values (HH:mm:ss) with javascript
*
* Usage:
* > addTimes('04:20:10', '21:15:10');
* > "25:35:20"
* > addTimes('04:35:10', '21:35:10');
* > "26:10:20"
* > addTimes('30:59', '17:10');
* > "48:09:00"
@evertramos
evertramos / .profile
Created August 29, 2017 11:54 — forked from HSBallina/.profile
Git aliases with autocompletion
echo "Hello World!
"
alias g="git"
alias ga='git add '
alias gb='git branch '
alias gc='git commit'
alias gd='git diff'
alias gm="git merge"
alias go="git checkout"