Skip to content

Instantly share code, notes, and snippets.

View daldantas's full-sized avatar

Gabriel daldantas

  • G4F ( TCE-SC )
  • Florianópolis, Santa Catarina - Brasil
View GitHub Profile
@daldantas
daldantas / gist:42f0868110f5f25c1acae392e3f959f5
Created September 25, 2018 16:19
How to create soft or simbolic link
sudo ln -s /workspace/dir mydir
chown -R daldantas:www-data mydir
@daldantas
daldantas / contacts.php
Created July 29, 2018 21:47
To get a table on a sheet (PHPOO/MySQL)
<?php
// DATABASE GENERATOR
// CREATE DATABASE db;
// USE db;
// CREATE TABLE contacts (
// id int(10) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
// name varchar(255) NOT NULL,
// email varchar(255) NOT NULL,
// phone varchar(15) NOT NULL);
// INSERT INTO contacts (name, email, phone) VALUES
@daldantas
daldantas / .htaccess
Last active July 29, 2018 21:52
To force https with htaccess
RewriteEngine On
# Redirect to HTTPS WC
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteCond %{HTTPS} off
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]