Skip to content

Instantly share code, notes, and snippets.

View sebastianvera's full-sized avatar

Sebastián Vera sebastianvera

View GitHub Profile
package main
import (
"bytes"
"fmt"
"io/ioutil"
"log"
"net/http"
"net/http/cookiejar"
"net/url"
[
{
"name": "TABLET LENOVO YOGA B6000 8",
"oldPrice": 159990,
"price": 99990,
"url": "http://www.ripley.cl/ripley-chile/esp-notebookid/tablet-lenovo-yoga-b6000-8-2000343658683p",
"discount": 37
},
{
"name": "TABLET ACER B1 730-17R9",

Con cuantos ceros termina:

  • 20!
  • 60!
  • 1000!
  • 10000!
  • 100000!
  • 174786321!

Cuáles son los factores primos?

#include <iostream>
#include <vector>
#include <algorithm>
#define INF std::numeric_limits<int>::max()
using namespace std;
typedef struct {
int dest, weight;
@sebastianvera
sebastianvera / es.yml
Created January 28, 2015 01:10
Example spanish rails local yml
es:
date:
abbr_day_names:
- dom
- lun
- mar
- mié
- jue
- vie
- sáb
" ========================================================================
" Vundle stuff
" ========================================================================
set nocompatible "Required by vundle
filetype off "Required by vundle
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
PROMPT='
%{$FG[203]%}%n%{$reset_color%} in %{$FG[214]%}${PWD/#$HOME/~}%{$reset_color%}$(git_prompt_info)
$ '
ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$FG[227]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$FG[243]%} *"
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$FG[243]%} ?"
ZSH_THEME_GIT_PROMPT_CLEAN=""
\usepackage{listings}
\lstloadlanguages{C}
\lstset{
frame=lrtb,
basicstyle=\footnotesize\color{black},
backgroundcolor=\color{white}, % choose the background color; you must add \usepackage{color} or \usepackage{xcolor}
breakatwhitespace=false, % sets if automatic breaks should only happen at whitespace
commentstyle = \ttfamily\color{red},
keywordstyle=\ttfamily\color{blue},
@sebastianvera
sebastianvera / es.yml
Last active August 29, 2015 13:57
Spanish i18n boilerplate
es:
date:
abbr_day_names:
- dom
- lun
- mar
- mié
- jue
- vie
- sá
#!/bin/sh
diff=`git diff --name-only HEAD@{1} HEAD`
migrate=`expr "$diff" : ".*db/migrate.*"`
bundle=`expr "$diff" : ".*Gemfile*"`
app_name=`basename $PWD`
if [ ! "$bundle" -eq 0 ]