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 "my_script" | |
| Shoes.app do | |
| button "run my_script" do | |
| Thread.new do | |
| call_method_in_script | |
| end | |
| 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
| Shoes.app do | |
| @variable = "im a string and im okay!" | |
| para @variable | |
| dialog do | |
| para @variable.inspect | |
| 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
| stack do | |
| cool_paras | |
| end | |
| def cool_paras | |
| para "im a cool para" | |
| para "and im okay" | |
| 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
| extension = case platform | |
| when "win32" then | |
| "exe" | |
| when "linux" then | |
| "run" | |
| when "osx" then | |
| "dmg" | |
| else | |
| raise "omg, unknown platform!" | |
| 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
| 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
| 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) | |
| # 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
| 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.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
| ## 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 |