Skip to content

Instantly share code, notes, and snippets.

View ivancrneto's full-sized avatar

Ivan Neto ivancrneto

View GitHub Profile

Diamond

Problem Description

Given a letter, print a diamond starting with ‘A’ with the supplied letter at the widest point.

For example: print-diamond ‘C’ prints

 A
# -*- coding: utf-8 -*-
from django.contrib.sites.models import Site
from django.db import models
class AdChannel(models.Model):
id = models.CharField(max_length=100, primary_key=True)
name = models.CharField(max_length=50)
CHANNEL_TYPE_CHOICES = (
('page', 'Page'), ('unit', 'Ad Unit'), ('template', 'Template'),
" MyConf
NeoBundle 'wakatime/vim-wakatime'
NeoBundle 'dkprice/vim-easygrep'
"NeoBundle 'scrooloose/nerdtree'
"NeoBundle 'jistr/vim-nerdtree-tabs'
"NeoBundle 'scrooloose/nerdcommenter'
"NeoBundle 'wincent/Command-T'
"NeoBundle 'kien/ctrlp.vim'
@ivancrneto
ivancrneto / neobundle-vimrc-windows
Created January 10, 2015 03:04
NeoBundle Vimrc Windows
if has('vim_starting')
set nocompatible " Be iMproved
" Required:
let &runtimepath .= ',' . expand($HOME . '/.vim/bundle/neobundle.vim/')
endif
" Required:
call neobundle#begin(expand($HOME . '/.vim/bundle/'))
@ivancrneto
ivancrneto / neobundle-vimrc-windows-dirty
Created January 10, 2015 03:03
NeoBundle Vimrc Windows dirty
if has('vim_starting')
set nocompatible " Be iMproved
" Required:
let &runtimepath .= ',' . expand($HOME . '/.vim/bundle/neobundle.vim/')
endif
" let neobundle_readme=expand($HOME . '/.vim/bundle/neobundle.vim/README.md')
"
" if !filereadable(neobundle_readme)
@ivancrneto
ivancrneto / neobundle-vimrc
Created December 24, 2014 16:39
NeoBundle to .vimrc
if has('vim_starting')
set nocompatible " Be iMproved
" Required:
set runtimepath+=~/.vim/bundle/neobundle.vim/
endif
let neobundle_readme=expand('~/.vim/bundle/neobundle.vim/README.md')
if !filereadable(neobundle_readme)
## {{{ http://code.activestate.com/recipes/532908/ (r3)
#! /usr/bin/env python
"""
pyText2Pdf - Python script to convert plain text files into Adobe
Acrobat PDF files with support for arbitrary page breaks etc.
Version 2.0
Author: Anand B Pillai <abpillai at gmail dot com>
@ivancrneto
ivancrneto / README.markdown
Created June 23, 2012 16:13 — forked from Yavari/README.markdown
Bootstrap's Typeahead plugin extended (allowing for AJAX functionality) among other things

This is a fork of Bootstrap Typeahead that adds minimal but powerful extensions.

This fork of the fork adds comparisons to string that have accents and prevent errors when the ajax is not complete yet.

For example, process typeahead list asynchronously and return objects

  # This example does an AJAX lookup and is in CoffeeScript
  $('.typeahead').typeahead(
    # source can be a function
    source: (typeahead, query) ->