Skip to content

Instantly share code, notes, and snippets.

View julianvargasalvarez's full-sized avatar

Julian Vargas julianvargasalvarez

  • SauceLabs Europe
  • Germany
View GitHub Profile
@julianvargasalvarez
julianvargasalvarez / LICENSE.txt
Created November 7, 2011 00:44 — forked from 140bytes/LICENSE.txt
140byt.es -- Click ↑↑ fork ↑↑ to play!
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Counting objects: 40, done.
Compressing objects: 100% (23/23), done.
Writing objects: 100% (24/24), 3.20 KiB, done.
Total 24 (delta 14), reused 0 (delta 0)
-----> Heroku receiving push
-----> Ruby/Rails app detected
-----> Installing dependencies using Bundler version 1.2.0.pre
Running: bundle install --without development:test --path vendor/bundle --binstubs bin/ --deployment
Using rake (0.9.2.2)
class SpaceObject
attr_accessor :the_type, :distance, :angular_speed, :current_angle
def initialize(the_type, distance_from_origin, angular_speed)
@the_type = the_type
@distance = distance_from_origin
@angular_speed = angular_speed
@current_angle = 0.0
end
" An example for a vimrc file.
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" 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
#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:
#!/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
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'];
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
@julianvargasalvarez
julianvargasalvarez / gist:bf3bc0b08760819a61f9
Created September 26, 2014 03:45
cosas para montor ubuntu
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