Skip to content

Instantly share code, notes, and snippets.

View cesc1989's full-sized avatar
🐻
¿Cuál es la diferencia entre la participación y el compromiso?

Francisco Quintero cesc1989

🐻
¿Cuál es la diferencia entre la participación y el compromiso?
View GitHub Profile
@cesc1989
cesc1989 / website-migration
Last active August 29, 2015 14:14
Bash script to migrate/update Drupal website from development environment to production
#!/bin/bash
# ESTE ARCHIVO TIENE POR PROPOSITO FACILITAR LA MIGRACION DE UN SITIO EN LOCAL
# A UN SITIO ANDANDO EN LINODE. SOLO PARA EL CASO DE ACTUALIZACIONES
#DECLARACIÓN DE VARIABLES NECESARIAS
greentext="\033[32m"
bold="\033[1m"
normal="\033[0m"
bkpdate=$(date +"%Y%m%d%s")
@cesc1989
cesc1989 / apache_subdomain.conf
Last active April 5, 2017 03:05
Correctly setup subdomain in apache conf file
<VirtualHost *:80>
# Admin email, Server Name (domain name), and any aliases
ServerAdmin user@mail.com
ServerName sub.domain.com
ServerAlias www.sub.domain.com
# Index file and Document Root (where the public files are located)
DirectoryIndex index.html index.php
DocumentRoot /var/www/subdomainfolder/public_html
# Log file locations
@cesc1989
cesc1989 / update_multiple_rows.php
Last active December 1, 2018 16:13
conectarse a la base de datos y actualizar varias filas mediante ciclo for
<?php
//CONEXION A LA BASE DE DATOS
$username = "root";
$password = "root";
$hostname = "localhost";
$link = mysql_connect($hostname, $username, $password);
if (!$link) {
die('Could not connect: ' . mysql_error());
}
@cesc1989
cesc1989 / connect_to_database_and_query.php
Last active April 5, 2017 03:05
conect to a database and query it to return data in json format
<?php
$numero_cedula = $_GET['cedula'];
//CONEXION A LA BASE DE DATOS
$username = "root";
$password = "root";
$hostname = "localhost";