Skip to content

Instantly share code, notes, and snippets.

View nisevi's full-sized avatar
🧑‍🚀
Working from anywhere

Nicolas Sebastian Vidal nisevi

🧑‍🚀
Working from anywhere
View GitHub Profile
@nisevi
nisevi / http1.py
Created April 30, 2019 14:59
TPL 5 - EJ12 - World Wide Web - HTTP
# coding: utf-8
import BaseHTTPServer
HOST_NAME = 'localhost'
PORT = 8000
class Handler(BaseHTTPServer.BaseHTTPRquestHandler):
def do_GET(server):
"""Respondo a una petición de tipo GET"""
@nisevi
nisevi / http2.py
Last active April 30, 2019 14:47
TPL 5 - EJ13 - World Wide Web - HTTP
# coding: utf-8
import BaseHTTPServer
HOST_NAME = 'localhost'
PORT = 8000
class Handler(BaseHTTPServer.BaseHTTPRequestHandler):
def do_GET(server):
@nisevi
nisevi / file_structure.txt
Last active May 1, 2019 17:28
Basic file structure for creating a gem
% tree thanoscase
thanoscase/
├── lib/
│ └── thanoscase/
│ └── string.rb
│ └── thanoscase.rb
└── thanoscase.gemspec
@nisevi
nisevi / dependencies.rb
Last active April 27, 2019 13:35
Depencias en RubyGems
Gem::Specification.new do |s|
s.name = 'demo_nisevi'
s.version = '0.0.1'
s.date = '2019-04-26'
s.summary = 'Demo nisevi gem'
s.description = 'A simple demo'
s.authors = ['Nicolas Sebastian Vidal']
s.email = 'nicolas.s.vidal@gmail.com'
s.homepage = 'http://rubygems.org/gems/demo_nisevi'
s.files = `git ls-files -z`.split("\x0").reject do |f|
@nisevi
nisevi / arrays.rb
Last active April 26, 2019 22:05
Algunos métodos de ruby sobre diferentes objetos
a = [ "a", "b", "c", "d" ]
a.collect {|x| x + "!"} #=> ["a!", "b!", "c!", "d!"]
a.map.with_index {|x, i| x * i} #=> ["", "b", "cc", "ddd"]
a #=> ["a", "b", "c", "d"]
[ "a", nil, "b", nil, "c" ].compact! #=> [ "a", "b", "c" ]
@nisevi
nisevi / config.yml
Last active April 22, 2019 14:40
How to deploy to Elastic Beanstalk by using CircleCI 2.1?
version: 2.1
orbs:
aws-cli: circleci/aws-cli@0.1.13
commands:
zip-app:
steps:
- run:
name: "Zip directory structure"
@nisevi
nisevi / index.html
Last active April 2, 2019 03:24
PAW_TP1_Maquetado_Punto_6
<section class="section-resume">
<div class="main-container">
<!--PRESENTATION-->
<table class="presentation">
<tbody>
<tr><td class="header name width-525">Nicolas Sebastian Vidal</td></tr>
<tr><td class="header profession">Software Engineer</td></tr>
</tbody>
</table>
<!--WORK EXPERIENCE-->
@nisevi
nisevi / index.html
Last active April 1, 2019 18:55
PAW_TP1_Maquetado_Punto_7
<table>
<tbody>
<tr>
<td class="fecha-de-entrega" rowspan="2">Fecha Entrega</td>
<td class="tp-border-solid">TP1</td>
<td class="tp-border-top-bottom-right">TP2</td>
<td class="tp-border-top-bottom-right">TP3</td>
<td class="tp-border-top-bottom-right">TP4</td>
<td class="tp-border-top-bottom-right">TP5</td>
<td class="tp-border-top-bottom-right">TP6</td>
@nisevi
nisevi / postgresql_configuration_on_ubuntu_for_rails.md
Created June 14, 2018 09:59 — forked from p1nox/postgresql_configuration_on_ubuntu_for_rails.md
PostgreSQL configuration without password on Ubuntu for Rails

Abstract

You could have postgre installed on localhost with password (or without user or password seted after instalation) but if we are developing we really don't need password, so configuring postgre server without password for all your rails project is usefull.

Install Postgre packages

  • postgresql
  • postgresql-client
  • libpq-dev
@nisevi
nisevi / ways_to_use_vcr.rb
Created May 30, 2018 20:42 — forked from myronmarston/ways_to_use_vcr.rb
Ways to use VCR for a request made by a let block
# 1) Use VCR.use_cassette in your let block. This will use
# the cassette just for requests made by creating bar, not
# for anything else in your test.
let(:foo) { VCR.use_cassette("foo") { create(:bar) } }
it "uses foo" do
foo
end
# 2) Wrap the it block that uses #foo in VCR.use_cassette.