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
# Mouse color:string archive_number:string archived_at:datetime | |
class Mouse < ActiveRecord::Base | |
acts_as_archival | |
attr_accessible :color | |
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
<h1>New ftp user</h1> | |
<form action="/web_hostings/2/ftp_users" class="formtastic ftp_user" id="new_ftp_user" method="post"> | |
<div style="margin:0;padding:0;display:inline"><input name="authenticity_token" type="hidden" value="O0A3Y7hx1rK0+W6NQqiNu0ai3/2QXaqrX+vKx8fU4rc=" /> | |
</div> | |
<fieldset class="inputs"> | |
<ol> <li class="string optional" id="ftp_user_sub_username_input"><label for="ftp_user_sub_username">Jméno</label><input id="ftp_user_sub_username" name="ftp_user[sub_username]" size="50" type="text" /></li> | |
<li class="password required" id="ftp_user_password_input"><label for="ftp_user_password">Heslo<abbr title="required">*</abbr></label><input id="ftp_user_password" name="ftp_user[password]" size="50" type="password" /></li> | |
<li class="string optional" id="ftp_user_sub_dir_input"><label for="ftp_user_sub_dir">Adresář na serveru</label><input id="ftp_user_sub_dir" name="ftp_user[sub_dir]" size="50" type="text" /></li> |
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
<% title 'Zaregistrovat nový účet'%> | |
<% semantic_form_for @account, :url => {:controller => :orders, :action => :new_account} do |f|%> | |
<% f.inputs do %> | |
<%= f.input :subdomain %> | |
<%= f.input :name %> | |
<%= f.input :street %> | |
<%= f.input :city %> | |
<%= f.input :psc %> | |
<%= f.input :phone %> | |
<%= f.input :ico %> |
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
## pomoci stringu | |
result = "" | |
if condition then | |
result << "neco neco #{kus ruby kodu pro vlozeni do stringu} neco neco" | |
end | |
zapis_to_do_souboru | |
## pomoci eruby | |
context = ERB.context.new |
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 self.up | |
create_table :ftp_users do |t| | |
t.string :username | |
t.string :password | |
t.string :uid | |
t.string :gid | |
t.string :dir | |
t.integer :web_hosting_id | |
t.integer :state | |
t.timestamps |
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 self.pkg(platform, opt) | |
extension = case platform | |
when "win32" then | |
"exe" | |
when "linux" then | |
"run" | |
when "osx" then | |
"dmg" | |
else | |
raise "Unknown platform" |
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 self.pkg(platform, opt) | |
# first try internet | |
# On the url there should be link to latest revision of our release. | |
# so programs writen for raisins will use latest revision of raisins and will not break with possible changes in future releases. | |
# I presume http://shoes.heroku.com/ | |
url = | |
case opt | |
when I_YES; "http://rock.nalinuxu.cz/~darktatka/pkg/#{RELEASE_NAME.downcase}/#{platform}/shoes" | |
when I_NOV; "http://shoes.heroku.com/pkg/#{RELEASE_NAME.downcase}/#{platform}/shoes-novideo" |
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
public Tah Najdi_nejlepsi_tah() | |
{ | |
Random rand = new Random (); | |
int i = 0; | |
for (i = 0; i < strom.Count; i++) | |
{ | |
if (strom[i].Ohodnoceni == 5000) |
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 self.pkg(platform, opt) | |
# short time solution <start> | |
extension = case platform | |
when "win32" then | |
"exe" | |
when "linux" then | |
"run" | |
when "osx" then | |
"dmg" | |
else |
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
extension = case platform | |
when "win32" then | |
"exe" | |
when "linux" then | |
"run" | |
when "osx" then | |
"dmg" | |
else | |
raise "omg, unknown platform!" | |
end |