Skip to content

Instantly share code, notes, and snippets.

View vsalbaba's full-sized avatar

Vojtech Salbaba vsalbaba

  • Red Hat
  • Czech Republic
View GitHub Profile
require "my_script"
Shoes.app do
button "run my_script" do
Thread.new do
call_method_in_script
end
end
end
Shoes.app do
@variable = "im a string and im okay!"
para @variable
dialog do
para @variable.inspect
end
end
stack do
cool_paras
end
def cool_paras
para "im a cool para"
para "and im okay"
end
extension = case platform
when "win32" then
"exe"
when "linux" then
"run"
when "osx" then
"dmg"
else
raise "omg, unknown platform!"
end
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
public Tah Najdi_nejlepsi_tah()
{
Random rand = new Random ();
int i = 0;
for (i = 0; i < strom.Count; i++)
{
if (strom[i].Ohodnoceni == 5000)
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"
def self.pkg(platform, opt)
extension = case platform
when "win32" then
"exe"
when "linux" then
"run"
when "osx" then
"dmg"
else
raise "Unknown platform"
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
## 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