This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rdl' | |
require 'types/core' | |
extend RDL::Annotate | |
class Option | |
extend RDL::Annotate | |
type_params Option, [:T], :all? | |
var_type :@value, 'T' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo adduser %USER% sudo | |
sudo apt-get update | |
sudo apt-get install curl git-core vim postgresql libpq-dev python python-virtualenv python-pip python-dev build-essential -y | |
sudo pip install --upgrade pip | |
sudo pip install --upgrade virtualenv | |
sudo apt-get install redis-server libxslt-dev libxml2-dev -y | |
sudo apt-get install libmemcached-dev zlib1g-dev libssl-dev python-dev -y | |
sudo apt-get install mysql-server -y | |
sudo apt-get install libmysqlclient-dev libmysql-ruby -y | |
sudo apt-get install libssl-dev libfontconfig1-dev gitk -y |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def test_when_a_user_with_inactive_account_login_the_body_show_correctly_a_error_message(self): | |
RegistrationProfile.objects.create_inactive_user("jefree", "[email protected]", "1234", "", False) | |
self.selenium.get('%s%s' % (self.live_server_url, '/accounts/login/')) | |
username_input = self.selenium.find_element_by_name("username") | |
username_input.send_keys('jefree') | |
password_input = self.selenium.find_element_by_name("password") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Fizz Buzz Bazz | |
hacer una funcion que receba un numero e imprima: | |
- fizz si es multiplo de 3 | |
- buzz si es multiplo de 5 | |
- bazz si es miltiplo de 3 y 5 | |
- n si no es multiplo de 3 ni 5 | |
========================================================= |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get update | |
sudo apt-get install curl git-core vim postgresql libpq-dev python python-virtualenv python-pip python-dev build-essential -y | |
sudo pip install --upgrade pip | |
sudo pip install --upgrade virtualenv | |
sudo apt-get install redis-server libxslt-dev libxml2-dev # libmagickwand-dev -y # libmagick9-dev | |
sudo apt-get install libmemcached-dev zlib1g-dev libssl-dev python-dev -y | |
sudo apt-get install mysql-server -y #para ramdisc | |
sudo apt-get install libmysq |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Multiplo | |
def la_suma(limite) | |
multiplos_de_3_o_5(limite).reduce(:+) | |
end | |
def multiplos_de_3_o_5(limite) | |
rango(10).each_with_object([]) do |x, resultado| | |
resultado << x if es_multiplo_de_tres(x) || es_multiplo_de_cinco(x) | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function contarVocales(cadena) { | |
var letras = cadena.toLowerCase().split(""); | |
var result = { | |
a: 0, | |
e: 0, | |
i: 0, | |
o: 0, | |
u: 0, | |
}; | |
var vocales = ['a', 'e', 'i', 'o', 'u']; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
status () { | |
echo "$(curl -Is -X GET $1 | head -n 1 | cut -d' ' -f2) $2" | |
} | |
status https://www.google.com.co/ google | |
status https://github.com/ github | |
status http://things.ubidots.com/api/v1.6/ ubidots_api_1.6 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#funcion para calcular un porcentaje de avance | |
# meta, avance | |
def es_igual(descripcion, dado, esperado): | |
print("%s: %s" % (dado==esperado, descripcion)) | |
def calcular_porcentaje(meta, avance): | |
if meta == 0: | |
return 0.0 | |
if avance > meta: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" An example for a vimrc file. | |
" | |
" Maintainer: Bram Moolenaar <[email protected]> | |
" Last change: 2008 Dec 17 | |
" | |
" To use it, copy it to | |
" for Unix and OS/2: ~/.vimrc | |
" for Amiga: s:.vimrc | |
" for MS-DOS and Win32: $VIM\_vimrc | |
" for OpenVMS: sys$login:.vimrc |
NewerOlder