Skip to content

Instantly share code, notes, and snippets.

View aduartem's full-sized avatar
馃彔
Working from home

Andr茅s Duarte M. aduartem

馃彔
Working from home
View GitHub Profile
@aduartem
aduartem / svn.md
Created October 6, 2016 14:39
Subversion por l铆nea de comandos (SVN)

SVN Workflow B谩sico

  1. Realizar una copia local del repositorio (working copy) (svn checkout svn://svnrepo/ejemplo {destino})
  2. Agregar/Modificar archivos
  3. Revisar el status (svn status)
  4. Revisar si hay diferencia entre los archivos locales y el repositorio remoto (svn diff {archivo})
  5. Agregar los archivos nuevos (svn add {archivo1 archivo2...})
  6. Revisar el status (svn status)
  7. Actualizar copia local (svn update)
  8. Revisar diferencias y corregir conflictos
@aduartem
aduartem / upload.js
Created September 6, 2016 13:43
Subir archivo con jQuery utilizando AJAX
$("#btn-upload").on('click',function () {
e.preventDefault();
var self = this;
$('#btn-upload').prop('disabled', true);
var data = new FormData(document.forms.namedItem('frm_upload'));
$.ajax({
url: '/documentos',
dataType: 'json',
method: 'POST',
@aduartem
aduartem / .vimrc
Created August 31, 2016 07:31
Config .vimrc + plugins
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'Vundle.vim'
Plugin '[email protected]:tomasr/molokai.git'
Plugin '[email protected]:scrooloose/nerdtree.git'
@aduartem
aduartem / .vimrc
Created August 30, 2016 00:04
.vimrc for developers
set enc=utf-8
set fenc=utf-8
set termencoding=utf-8
set nocompatible
set autoindent
set smartindent
set expandtab
set tabstop=2
set shiftwidth=2
set textwidth=120
@aduartem
aduartem / request_headers_helper.php
Created August 24, 2016 00:05
PHP - Apache Request Headers Helper
<?php
if( !function_exists('apache_request_headers') ) {
function apache_request_headers() {
$arh = array();
$rx_http = '/\AHTTP_/';
foreach($_SERVER as $key => $val) {
if( preg_match($rx_http, $key) ) {
$arh_key = preg_replace($rx_http, '', $key);
@aduartem
aduartem / downgrade_php7.md
Created August 19, 2016 02:15
Downgrade de php7 a php5.6 en Ubuntu 16.04

Downgrade de php7 a php5.6 en Ubuntu 16.04

Update

$ sudo a2dismod proxy_fcgi proxy
$ sudo service apache2 restart

Reinstalar php 5.6

@aduartem
aduartem / xdebug.md
Last active May 21, 2022 19:37
Debug de c贸digo PHP con Xdebug y Netbeans

Debug de c贸digo PHP con XDebug y Netbeans

Requisitos

  • Tener instalado php
  • Tener instalador un web server (Apache o Nginx)

Mac OS X - El Capitan

Instalar Netbeans con soporte para PHP

@aduartem
aduartem / curso_rails.md
Last active May 21, 2022 19:36
Curso de Ruby on Rails 4 desde cero

Curso de Ruby on Rails 4 desde cero

Instalar RVM, Ruby 2.3.0 y Ruby on Rails 4.2.6 en OS X El Capitan

Antes de comenzar es necesario tener instalado Xcode y Homebrew.

Xcode se puede instalar desde la App Store

Homebrew es un gestor de paquetes para OS X.

@aduartem
aduartem / crear_maquina.md
Created June 16, 2016 20:35
Como crear una m谩quina de QA Amazon con Ubuntu 14.04

Documentaci贸n proceso de creaci贸n de m谩quina de QA Amazon con Ubuntu 14.04

I. Actualizar el listado de paquetes disponibles

$ sudo apt-get update

II. Agregar Swap

@aduartem
aduartem / install_nginx_php_mariadb.md
Last active May 21, 2022 19:36
Instalar Nginx, PHP y MariaDB en Mac OS X

Instalar Nginx, PHP y MariaDB en Mac OS X

Para instalar Nginx, PHP-FPM y MariaDB utilizaremos Homebrew.

Instalar Homebrew

$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"