Skip to content

Instantly share code, notes, and snippets.

@fitorec
fitorec / DbDump.php
Created March 2, 2020 19:58
Agregar comando Artisan de Laravel para backups de la base de datos
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Foundation\Application;
use Illuminate\Foundation\Bootstrap\LoadEnvironmentVariables;
use Dotenv\Dotenv;
/**
@ilhamsj
ilhamsj / laravel-notes.md
Last active July 13, 2023 02:08
Force HTTPS laravel on heroku

Force HTTPS laravel on heroku

add this line after RewriteEngine On

RewriteCond %{HTTP:X-Forwarded-Proto} =http [OR]
RewriteCond %{HTTP:X-Forwarded-Proto} =""
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

app\Http\Middleware\TrustProxies.php

@marcandreappel
marcandreappel / xdebug_devilbox_phpstorm_postman.md
Last active August 22, 2022 06:24 — forked from yannbertrand/using_xdebug_with_postman.md
Using Xdebug on Devilbox with PhpStorm and Postman

The tutorial got a new home, head over to the newly created repo (for more flexibility and better interaction).

@deardooley
deardooley / 000-default.conf
Last active February 21, 2023 03:19
Sample Apache virtual host to proxy subdomain to docker container
<VirtualHost *:80>
ServerAdmin admin@example.com
DocumentRoot /var/www
ServerName docker.example.com
ErrorLog logs/docker.example.com_error.log
CustomLog logs/docker.example.com_access.log combined
ProxyPreserveHost On
ProxyRequests off
<Location />
@tedmiston
tedmiston / nodejs-tcp-example.js
Last active May 20, 2024 11:27
Node.js TCP client and server example
/*
In the node.js intro tutorial (http://nodejs.org/), they show a basic tcp
server, but for some reason omit a client connecting to it. I added an
example at the bottom.
Save the following server in example.js:
*/
var net = require('net');