This file contains 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
#Script para obtener los Mb enviados y recibidos por | |
#una interfaz de red determinada. | |
#incluye una funcion para convertir Bytes a MB | |
#tiene unas pequeñas fallas que pronto arreglare! :) | |
def bytestomb bytes | |
mb = bytes.to_f / (1024*1024) | |
mb | |
end |
This file contains 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
#!/usr/bin/env ruby | |
# coding: utf-8 | |
puts "Favor ingresa tu nombre" | |
nombre = gets.chomp | |
puts "#{nombre} cuantos años cumples???" | |
anios = gets.chomp.to_i | |
anios.times do |num| | |
puts "#{num.to_s} Feliz Cumpleaños #{nombre}!!!" |
This file contains 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
#!/usr/bin/env ruby | |
#coding: utf-8 | |
# Felicitador V2.0 POO | |
class Cumple | |
def initialize(nombre, anios) | |
@minombre = nombre | |
@mianios = anios | |
end |
This file contains 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
# based on the import script by icebreaker, which is based on mojombo's | |
# https://github.com/mojombo/jekyll/blob/master/lib/jekyll/migrators/wordpress.rb | |
# https://gist.github.com/303570 | |
# edited to rewrite image URLs to use my CloudFront URL | |
require 'rubygems' | |
require 'sequel' | |
require 'fileutils' | |
require 'yaml' |
This file contains 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
#!/usr/bin/env ruby | |
def leer archivo | |
File.foreach(archivo).with_index do |linea, indice | | |
puts "#{indice}: #{linea}" | |
end | |
end | |
if ARGV.size > 1 | |
puts "Este script solo admite un argumento!" |
This file contains 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
# Ignore bundler config | |
/.bundle | |
# Ignore the default SQLite database. | |
/db/*.sqlite3 | |
# Ignore all logfiles and tempfiles. | |
/log/*.log | |
/tmp |
This file contains 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 "mongo" | |
connection = Mongo::Connection.new("localhost", 27017) | |
db = connection.db("students") | |
coll = db.collection("grades") | |
199.times do |n| | |
doc = coll.find("student_id" => n, "type" => "homework").sort(:score => :asc).limit(1) |
This file contains 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
#configs para Tmux | |
#shell por defecto | |
#set -g default-command /bin/zsh | |
#set -g default-shell /bin/zsh | |
#tecla de prefijo de Tmux cambiada similar a Screen: Ctrl-a | |
#de Ctrl-b a Ctrl-a | |
set -g prefix C-a |
This file contains 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
<?xml version="1.0"?> | |
<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> | |
<fontconfig> | |
<match target="font" > | |
<edit mode="assign" name="rgba" > | |
<const>rgb</const> | |
</edit> | |
</match> | |
<match target="font" > | |
<edit mode="assign" name="hinting" > |
This file contains 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
install: --no-rdoc --no-ri | |
update: --no-rdoc --no-ri |
OlderNewer