- Some utilities:
sudo apt-get install vim tmux git curl
- Copy/paste from the command line:
sudo apt-get install xclip
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Application</title> | |
<%= stylesheet_link_tag "application", :media => "all" %> | |
<%= javascript_include_tag "application" %> | |
<%= csrf_meta_tags %> | |
</head> | |
<body> |
function fdwRefreshOnline() { | |
var variation = Math.floor(fdwOnline.guest * 0.01); | |
var randvar = fdwOnline.guest + fdwOnline.registered - Math.floor(Math.random() * variation); | |
var element = document.getElementById("totalonline"); | |
if (element.innerHTML != randvar) { | |
YAHOO.util.Dom.setStyle(element, "opacity", 0); | |
element.innerHTML = randvar; | |
fdwRefreshAnimate(); | |
} | |
setTimeout(fdwRefreshOnline, 5000); |
a = File.read './texto.txt' | |
b = a.scan(/inicio([\s\S]+?)fin/) | |
# un array para guardar los registros | |
c = [] | |
b.each do |s| | |
# creo un hash para guardar los datos del registro actual | |
d = {} | |
# agrego cada uno de los campos | |
d[:edad] = s.to_s.scan(/edad (.+?)/) | |
# agrego el hash creado al arreglo |
class FortuneTellerMachine | |
WELCOME = "Hola ¿Quiéres saber tu fortuna?" | |
REQUEST = "Fortuna por monedas, yo quiero yo quiero monedas (2): " | |
CHANGE_BACK = "Here is your change" | |
COST = 2 | |
def initialize | |
clear | |
end |
source 'https://rubygems.org' | |
gem 'rails', '3.2.9' | |
# Bundle edge Rails instead: | |
# gem 'rails', :git => 'git://github.com/rails/rails.git' | |
gem 'sqlite3' | |