Skip to content

Instantly share code, notes, and snippets.

View andru255's full-sized avatar
🇵🇪
:)

Andrés Muñoz andru255

🇵🇪
:)
View GitHub Profile
@andru255
andru255 / gist:6002933
Created July 15, 2013 20:01
clean fields de un wrapper que sea como form
$(':input','#myform')
.not(':button, :submit, :reset, :hidden')
.val('')
.removeAttr('checked')
.removeAttr('selected');
(Copied From: http://alexfluger.blogspot.com/2012/01/easy-deploy-to-ftp-from-git.html) (Thank you Alex, this has helped me alot!)
Easy deploy to FTP from GIT
Have a shared hosting? No SSH and Git? Take a look on git-ftp. It is very easy to install and use. Here I will show you how to install it and start to use.
Installation
First, clone source code repository from github (it will create git-ftp folder):
@andru255
andru255 / gist:6025575
Created July 17, 2013 23:45
3er forma de tunear el bashrc esta vez mostrando el signo del status de un repo bajo git y orden chevere a color de la ruta bajo []
if [ -f /etc/bash_completion ]; then
source /etc/bash_completion
fi
__has_parent_dir () {
# Utility function so we can test for things like .git/.hg without firing up a
# separate process
test -d "$1" && return 0;
current="."
@andru255
andru255 / actualizando-releases-y-master-sin-verse-ambos
Last active December 19, 2015 23:19
Los n pasos cuando no podemos trabajar en local,solo se puede trabajar en master y queremos que el releases y master se lleven bien.
#si modificas en master y quieres ponerlo en un hotfix:
#1. detectar que archivos haz modificado en master
#2. luego cambias a la rama releases
git checkout releases
#3. aplicas pull
git pull origin releases
#4. creas tu rama (que será hotfix)
git checkout -b hotfix#peque-desc-my-parche
#5. Aqui viene la chamba seria: comparas los archivos modificados con
#la rama master
@andru255
andru255 / gist:6034271
Created July 19, 2013 00:44
tips en terminal.. PARTE I
#para traer una rama remota y crear una local de esa
# remota:local
git fetch origin releases:releases
#diferenciar por nombres de archivos en ambas ramas
# rama-1 rama-2
git diff master b-master --name-only
@andru255
andru255 / gist:6084335
Created July 25, 2013 22:25
alias de GIT en linux, agregar debajo del .bashrc
alias gam='git commit -am'
alias grm='git rm'
alias gmv='git mv'
alias grr='git reset --hard HEAD'
alias goop="git commit --amend -C HEAD -n"
alias gls='git log --pretty=format:"%C(reset)%h %C(yellow)%ad%C(yellow)%d %C(reset)%s%C(green) [%cn]" --decorate --date=short'
alias ga='git add'
alias gp='git push'
alias gl='git log --name-status'
alias gs='git status'
@andru255
andru255 / gist:6136136
Created August 1, 2013 23:05
Hacer pull sin hacer commit ni add, una buena jugada
.. luego de haber hecho tus cambios sin aplicar add ni commit y querés aplicar pull se hace lo siguiente:
el git stash almacena una rama temporal donde toma tus cambios
$ git stash
aplicamos el pull correspondiente..
$ git pull origin [mi-rama]
y luego retornamos los cambios de la rama temporal
$ git stash apply stash@{0}
@andru255
andru255 / gist:6149315
Created August 4, 2013 05:40
mostrar un conky bacan..
use_xft yes
xftfont 123:size=8
xftalpha 0.1
update_interval 1
total_run_times 0
own_window yes
own_window_type override
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
@andru255
andru255 / gist:6152927
Created August 5, 2013 01:47
En caso se muestre un error al instalar las dependencias del Zend Framework Skeleton aplicar esto:
To install ZF2 Without doctrine ORM run following commands in your working directory
git clone git://github.com/zendframework/ZendSkeletonApplication.git
php composer.phar self-update
php composer.phar require zendframework/zend-developer-tools:dev-master
cp vendor/zendframework/zend-developer-tools/config/zenddevelopertools.local.php.dist config/autoload/zdt.local.php
chmod 777 data/cache/
//enable modules in config/application.config.php file
@andru255
andru255 / autocomplete-flow
Created August 11, 2013 05:56
Modeling autocomplete control - se ejecuta en : http://www.websequencediagrams.com/
title Autocomplete Sequence
User->CboDepartamento: onChange:SeleccionaDepartamento()
note over User,CboDepartamento: Selecciona el Departamento
CboDepartamento-->CollectionDistrito: onChange:fillDistritos()
note over CboDepartamento,CollectionDistrito: Se almacenan los distritos del departamento seleccionado
User->InputDistrito: onFocus:CleanField()