Skip to content

Instantly share code, notes, and snippets.

View ncuesta's full-sized avatar
🤓

Nahuel Cuesta Luengo ncuesta

🤓
View GitHub Profile
@ncuesta
ncuesta / ncuesta.zsh-theme
Last active July 16, 2018 12:34
Personal theme for zsh prompts
# vim:ft=zsh ts=2 sw=2 sts=2
# Original theme taken from https://github.com/jackharrisonsherlock/common - all credit goes to @jackharrisonsherlock
# Just copied this to further customize it.
# Prompt symbol
COMMON_PROMPT_SYMBOL="❯"
# Left Prompt
PROMPT='$(common_host)$(common_current_dir)$(common_rb_version)$(common_return_status)'
@ncuesta
ncuesta / curl.rb
Last active December 18, 2017 20:21
#!/usr/bin/env ruby
# Implementación sencilla de un clon de cURL para utilizar en el examen.
# El script debe invocarse como un ejecutable (deberás darle permisos
# de ejecución con `chmod +x curl.rb`) y espera recibir los siguientes
# argumentos:
# - La URL a la cual realizar la petición
# - El método http a utilizar (opcional), que puede ser GET, POST o
# DELETE (si se omite se considera GET).
# - El cuerpo de la petición a realizar (opcional, sólo aplica en caso
@ncuesta
ncuesta / show.html.erb
Created December 11, 2017 14:01
Ejemplo de un helper method en el controller, utilizado en el controller y en la vista
<%- ... -%>
<h1>
Detalles del docente <%= display_teacher(@teacher) -%>
</h1>
<%- ... -%>
@ncuesta
ncuesta / prueba.txt
Last active April 26, 2016 10:10
Entrada de ejemplo para el ejercicio del segundo parcialito de Seminario C - 2016
Oid, mortales, el grito sagrado:
"Libertad, libertad, libertad!"
Oid el ruido de rotas cadenas,
ved en trono a la noble igualdad.
Ya su trono dignisimo abrieron
las Provincias Unidas del Sud
y los libres del mundo responden:
@ncuesta
ncuesta / ejercicio_1.output
Last active March 29, 2016 10:44
Salida esperada de los ejercicios del primer parcialito - C 2016
El área de un triángulo de base = 8.09 y altura = 12.113 es de 48.997085
El área de un rectángulo de base = 10293 y altura = 71.981 es de 740900.433000
El área de un cuadrado de lado = 123896.1 es de 15350243595.210001
El área de un rombo de diagonal mayor = 9.9001 y diagonal menor = 0.001 es de 0.009900
@ncuesta
ncuesta / ical.py
Created May 11, 2013 17:12
Ejemplo de uso de icalendar en Python
#
# Ejemplo (acotado) de uso de icalendar
#
import icalendar
from datetime import date
# Creo un evento
event = icalendar.cal.Event()
# Especifico la fecha de inicio
<?php
/**
* TbForm class file.
*
* Support for Yii formbuilder
* @link <http://www.yiiframework.com/doc/guide/1.1/en/form.builder>
*
* Usage:
*
* 1. Create a CForm model
@ncuesta
ncuesta / rails-master
Last active December 10, 2015 10:39
Short script to keep an updated local copy of Ruby on Rails master branch and run commands using that version rather than a global stable version of the framework.
#!/bin/bash
# Keep an updated local copy of Ruby on Rails
# and use it to run commands, rather than the
# version you might have installed as a gem
# on your system
#
# @author ncuesta
# Customize this with your own fork
@ncuesta
ncuesta / index.html
Created December 2, 2012 21:11
A CodePen by douglasdeodato. Single Element Pure CSS MacBook Pro - This is just an experiment! There are certainly better ways to show an image of a MacBook, but none as fun as this :)
<i class="macbook"></i>
@ncuesta
ncuesta / index.html
Created December 2, 2012 21:10
A CodePen by douglasdeodato. Single Element Pure CSS MacBook Pro - This is just an experiment! There are certainly better ways to show an image of a MacBook, but none as fun as this :)
<i class="macbook"></i>