Skip to content

Instantly share code, notes, and snippets.

View gdespirito's full-sized avatar

Gonzalo De Spírito gdespirito

View GitHub Profile
# ************************************************************
# Tabla de Regiones y Comunas de Chile (incluyendo Ñuble) 2018
# ************************************************************
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
@gdespirito
gdespirito / 2017_11_21_144804_create_regions_table.php
Last active February 23, 2023 17:55
Comunas y regiones de Chile - 2017 | Migraciones y Seeders para Laravel
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateRegionsTable extends Migration
{
/**
* Run the migrations.
@eaguad1337
eaguad1337 / VeeRutValidator.js
Created October 16, 2017 20:43
Chilean Rut Validator for VeeValidate
// Eduardo Aguad eduaguad@gmail.com
// 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 = {
@M165437
M165437 / db-connect-test.php
Last active May 26, 2023 05:34 — forked from chales/db-connect-test.php
Script for a quick PHP MySQL DB connection test.
<?php
# Fill our vars and run on cli
# $ php -f db-connect-test.php
$dbname = 'name';
$dbuser = 'user';
$dbpass = 'pass';
$dbhost = 'host';
$link = mysqli_connect($dbhost, $dbuser, $dbpass) or die("Unable to Connect to '$dbhost'");
@ipedrazas
ipedrazas / gist:6d6c31144636d586dcc3
Last active July 10, 2023 16:24
Nginx ssl config

The process starts by creating the CSR and the private key:

openssl req -nodes -newkey rsa:2048 -nodes -keyout dotmarks.net.key -out dotmarks.net.csr -subj "/C=GB/ST=London/L=London/O=dotmarks/OU=IT/CN=dotmarks.net"

Generates

  • dotmarks.net.key
  • dotmarks.net.csr
@bradmontgomery
bradmontgomery / install-comodo-ssl-cert-for-nginx.rst
Last active April 1, 2024 11:21
Steps to install a Comodo PositiveSSL certificate with Nginx.

Setting up a SSL Cert from Comodo

I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert