Skip to content

Instantly share code, notes, and snippets.

View humus's full-sized avatar

Robertob humus

  • Mexico City
View GitHub Profile
@humus
humus / _vimrc
Created November 15, 2013 17:13
mi _vimrc en windows
set enc=utf-8
set nocompatible
set et
set sw=4
set sts=4
set ts=4
set noswapfile
syntax on
set ignorecase
set smartcase
@humus
humus / modified.sh
Created October 6, 2013 01:56
Encontrar archivos modificados en los últimos 40 segundos
#!/bin/bash
set -e
touch -d "40 seconds ago" reference.ignoreme
find . -type f -newer reference.ignoreme
rm reference.ignoreme
@humus
humus / camelcaselast.vim
Created September 16, 2013 16:35
Convertir último texto ingresado en una línea a camel case
fun! Camel_last() "{{{
let start_mod = getpos("'[")
let end_mod = getpos("']")
if (start_mod[1] != end_mod[1])
return
endif
let mod_line = getline(start_mod[1])
let inserted_text = mod_line[start_mod[2] - 1 :end_mod[2] - 2]
@humus
humus / snake_case.vim
Last active December 23, 2015 03:59
Función para cambiar a snake_case la últimas palabras escritas
fun! Snake_last() "{{{
let start_mod = getpos("'[")
let end_mod = getpos("']")
if start_mod[1] != end_mod[1]
return
endif
let mod_line = getline(start_mod[1])
let inserted_text = mod_line[start_mod[2] - 1:end_mod[2] - 2]
@humus
humus / urlrewrite.xml
Created February 23, 2013 23:59
Url rewrite para aplicación spring-mvc
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE urlrewrite
PUBLIC "-//tuckey.org//DTD UrlRewrite 3.0//EN"
"http://www.tuckey.org/res/dtds/urlrewrite3.0.dtd">
<urlrewrite default-match-type="wildcard">
<rule>
<from>/</from>
<to type="redirect" last="true">home</to>
</rule>
<rule match-type="regexp">
@humus
humus / applicationContext.xml
Last active December 14, 2015 03:29
Configuración inicial de proyecto con spring
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
</beans>
@humus
humus / log4j.xml
Created February 23, 2013 23:08
Configuración de Log4j en proyecto web que usa spring
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE log4j:configuration PUBLIC "-//APACHE//DTD LOG4J 1.2//EN" "log4j.dtd">
<log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/' debug="true">
<appender name="console" class="org.apache.log4j.ConsoleAppender">
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d %-5p [%t] %c - %m%n"/>
</layout>
</appender>
<appender name="webplog" class="org.apache.log4j.RollingFileAppender">
<param name="File" value="webp.log"/>
@humus
humus / .gvimrc
Created September 16, 2012 16:33
Mappings para archivos .tex cuando trabajo en LaTeX
au FileType tex imap á \'a
au FileType tex imap é \'e
au FileType tex imap í \'i
au FileType tex imap ó \'o
au FileType tex imap ú \'u
au FileType tex imap ñ \~n
au FileType tex imap Á \'A
au FileType tex imap É \'E
au FileType tex imap Í \'I
@humus
humus / .gvimrc
Created September 16, 2012 16:33
Mappings para archivos .tex cuando trabajo en LaTeX
au FileType tex imap á \'a
au FileType tex imap é \'e
au FileType tex imap í \'i
au FileType tex imap ó \'o
au FileType tex imap ú \'u
au FileType tex imap ñ \~n
au FileType tex imap Á \'A
au FileType tex imap É \'E
au FileType tex imap Í \'I
@humus
humus / plugins.ini
Created September 13, 2012 03:08
Archivo que uso con el script Pathosync para tener al día mis plugins y snippets
[git]
pathogen = http://github.com/tpope/vim-pathogen
nerdtree = http://github.com/scrooloose/nerdtree.git
nerdcommenter = http://github.com/scrooloose/nerdcommenter.git
vim-surround = https://github.com/tpope/vim-surround.git
vim-easymotion = https://github.com/lokaltog/vim-easymotion.git
xptemplate = https://github.com/drmingdrmer/xptemplate-dist.git
vim-live-latex-preview = https://github.com/ying17zi/vim-live-latex-preview.git
repeat = https://github.com/tpope/vim-repeat
blackboard = https://github.com/humus/blackboard.vim.git