Skip to content

Instantly share code, notes, and snippets.

View groteck's full-sized avatar
:octocat:

Juan Fraire groteck

:octocat:
View GitHub Profile
@groteck
groteck / practica 1
Created February 28, 2012 21:36
aan
#include "ami.h"
#include "ami_bmp.h"
#include <stdio.h>
#include<stdlib.h>
#include<string.h>
// funcion que nos permite unir los canales de dos imagenes, separados por una línea negra de
//4 pixeles
void aan_unir_canales_unsigned_char(unsigned char *canal1, unsigned char *canal2,
unsigned char **canal_output, int width, int height){
int i,j,k;
@groteck
groteck / vim install clean
Created May 4, 2012 23:56
add sub gits repo
cd ~/.vim/
git submodule add git://github.com/nono/vim-handlebars.git bundle/handlebars
vim bundle/handlebars/example.handlebars
@groteck
groteck / .tmux.conf
Last active March 30, 2017 16:54
my tmux configuration
# $Id: screen-keys.conf,v 1.7 2010/07/31 11:39:13 nicm Exp $
#
# By Nicholas Marriott. Public domain.
#
# This configuration file binds many of the common GNU screen key bindings to
# appropriate tmux key bindings. Note that for some key bindings there is no
# tmux analogue and also that this set omits binding some commands available in
# tmux but not in screen.
#
# Note this is only a selection of key bindings and they are in addition to the
@groteck
groteck / workflow.md
Created November 21, 2012 12:55
github flujo de trabajo

Flujo de trabajo:

1. Crear rama:

Creamos una rama en el proyecto para nuestra funcionalidad, normalmente estas funcionalidades o tareas, se suelen asociar a un gestor de tareas (como por ejemplo Teambox, pivotaltracker, clockingit...), y suelen contener una id asi que la gente crea las ramas por ejemplo 34-add-users y asi cuando tienes muchas ramas, y en las cuales por ejemplo se podria repetir un nombre por el fallo de poner algo genérico como nombre de la rama, por ejemplo fixed-test, si quieres hacer referencia a una concreta eso es lo mejor para saber a que rama dirigirnos para revisar una tarea si nos hace falta.

2. Añade commits:

Simplemente trabaja haciendo commits en esa rama hasta terminar, para hacer memoria recordar el flujo normal de de hacer commits y subirlos a una rama en concreto: -$ git add . -$ git commit -m git push servidor rama

3. Mergeamos con master:

@groteck
groteck / sonia.rb
Created March 9, 2013 22:35
ejercicio con pacorub
#!/usr/bin/env ruby
puts "Dime tu nombre guapo"
var = gets.chomp
puts "hola #{var} yo soy Sofia"
puts "Quieres verme?"
if gets.chomp == "si"
`chromium-browser --app=http://www.wallpapergate.com/data/media/1973/Sofia_Zamolo_012.jpg`
else
puts "Las cosas conmigo tienen que ser claras pajero"
@groteck
groteck / words_count.rb
Created August 29, 2013 21:03
Use .each to iterate over the words array. For each word we find, we'll want to make the word a key in the hash and increment its value by 1. (This is why our default is 0: when we first find the word, it will have a default value of 0 that we can increment up to 1.)
#!/usr/bin/env ruby
# encoding: utf-8
puts "introduzca palabras para contarlas: "
text = gets.chomp
words = text.split
frequencies = {}
words.each do |w|
frequencies.has_key?(w) ? frequencies[w] += 1 : frequencies[w] = 1
end
@groteck
groteck / A-Pen-by-groteck.markdown
Last active December 23, 2015 13:49
Example of terminal emulator
@groteck
groteck / A-Pen-by-groteck.markdown
Last active December 24, 2015 19:59
A Pen by groteck.
@groteck
groteck / pingdaemon.rb
Created November 19, 2013 02:20
daemonice command when all is ok
#!/usr/bin/env ruby
require 'io/console'
io = IO.popen("ping www.google.com")
io.each do |line|
if line.include? "icmp_seq=5"
@groteck
groteck / bundles.vim
Last active August 29, 2015 13:57
this is my vim config at work
" Base .vimrc file
" Installation Instructions
" 1. Place file in home directory as .vimrc
" 2. Run the following command in terminal
" mkdir .vim .vim/bundle .vim/backup .vim/swap .vim/cache .vim/undo; git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim
" 3. Launch Vim and Run
" :PluginInstall
" Or from shell vim +PluginInstall +qall
" 4. Restart Vim