Skip to content

Instantly share code, notes, and snippets.

View edgarronda's full-sized avatar
🚀
Working from anywhere.

Edgar Ronda edgarronda

🚀
Working from anywhere.
View GitHub Profile
@edgarronda
edgarronda / django_deploy.md
Created February 22, 2019 23:46 — forked from bradtraversy/django_deploy.md
Django Deployment - Digital Ocean

Django Deployment to Ubuntu 18.04

In this guide I will go through all the steps to create a VPS, secure it and deploy a Django application. This is a summarized document from this digital ocean doc

Any commands with "$" at the beginning run on your local machine and any "#" run when logged into the server

Create A Digital Ocean Droplet

Use this link and get $10 free. Just select the $5 plan unless this a production app.

<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
body {
background-image: url(../images/fondo_30.jpg);
background-attachment: fixed;
background-position: center center;
background-size: cover;
}
/*Clase para efectos en imagenes tipo boton*/
.mask-top1 {
@edgarronda
edgarronda / insertinto_with_errors.sql
Last active June 26, 2024 20:26
Inserción con Captura de Errores
-- Crear tabla temporal
CREATE TEMPORARY TABLE TempTable AS
SELECT col1, col2, ...
FROM TablaOrigen;
-- Intentar insertar y capturar errores
DO $$
DECLARE
rec RECORD;
BEGIN
@edgarronda
edgarronda / insert_into_with_errors_for_SQL.txt
Last active June 26, 2024 21:53
insert_into_with_errors_for_SQL.sql
-----------------------------------------
-- Creation error table.
-----------------------------------------
IF OBJECT_ID('dbo.TablaErrores', 'U') IS NULL
BEGIN
CREATE TABLE dbo.TablaErrores (
id INT IDENTITY(1,1) PRIMARY KEY,
col1 INT,
col2 VARCHAR(255),
ErrorMensaje NVARCHAR(MAX),