Skip to content

Instantly share code, notes, and snippets.

@asonas
Forked from itochan/java_plus_you.rb
Last active August 29, 2015 13:58
Show Gist options
  • Select an option

  • Save asonas/10363347 to your computer and use it in GitHub Desktop.

Select an option

Save asonas/10363347 to your computer and use it in GitHub Desktop.

Revisions

  1. asonas revised this gist Apr 10, 2014. 1 changed file with 6 additions and 2 deletions.
    8 changes: 6 additions & 2 deletions java_plus_you.rb
    Original file line number Diff line number Diff line change
    @@ -8,12 +8,16 @@ def DOWNLOAD(today)
    puts "Free Java Download"
    puts JAVA

    `open #{JAVA}` if `uname`.chomp == "Darwin"
    `open #{JAVA}` if DARWIN?
    end

    private def DARWIN?
    `uname`.chomp == "Darwin"
    end

    def TODAY!
    Date.today
    end

    JAVA + YOU
    DOWNLOAD TODAY!
    DOWNLOAD TODAY!
  2. @itochan itochan revised this gist Apr 10, 2014. 1 changed file with 3 additions and 2 deletions.
    5 changes: 3 additions & 2 deletions java_plus_you.rb
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,7 @@
    require "date"
    require 'date'
    require 'i18n'

    JAVA = "http://www.java.com/en/"
    JAVA = "http://www.java.com/#{I18n.locale}/"
    YOU = `whoami`

    def DOWNLOAD(today)
  3. @itochan itochan revised this gist Apr 10, 2014. 1 changed file with 1 addition and 3 deletions.
    4 changes: 1 addition & 3 deletions java_plus_you.rb
    Original file line number Diff line number Diff line change
    @@ -7,9 +7,7 @@ def DOWNLOAD(today)
    puts "Free Java Download"
    puts JAVA

    if `uname`.chomp == "Darwin"
    `open #{JAVA}`
    end
    `open #{JAVA}` if `uname`.chomp == "Darwin"
    end

    def TODAY!
  4. @itochan itochan revised this gist Apr 10, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion java_plus_you.rb
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    require "date"

    JAVA = "http://www.java.com/en/"
    YOU = ""
    YOU = `whoami`

    def DOWNLOAD(today)
    puts "Free Java Download"
  5. @itochan itochan revised this gist Sep 1, 2013. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions java_plus_you.rb
    Original file line number Diff line number Diff line change
    @@ -1,14 +1,14 @@
    require "date"

    JAVA = 1
    YOU = 1
    JAVA = "http://www.java.com/en/"
    YOU = ""

    def DOWNLOAD(today)
    puts "Free Java Download"
    puts "http://www.java.com/en/"
    puts JAVA

    if `uname`.chomp == "Darwin"
    `open http://www.java.com/en/`
    `open #{JAVA}`
    end
    end

  6. @itochan itochan revised this gist Sep 1, 2013. 1 changed file with 6 additions and 3 deletions.
    9 changes: 6 additions & 3 deletions java_plus_you.rb
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,7 @@
    require 'date'
    require "date"

    JAVA = 1
    YOU = 1
    TODAY = Date.today

    def DOWNLOAD(today)
    puts "Free Java Download"
    @@ -13,5 +12,9 @@ def DOWNLOAD(today)
    end
    end

    def TODAY!
    Date.today
    end

    JAVA + YOU
    DOWNLOAD TODAY
    DOWNLOAD TODAY!
  7. @itochan itochan revised this gist Sep 1, 2013. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions java_plus_you.rb
    Original file line number Diff line number Diff line change
    @@ -6,6 +6,7 @@

    def DOWNLOAD(today)
    puts "Free Java Download"
    puts "http://www.java.com/en/"

    if `uname`.chomp == "Darwin"
    `open http://www.java.com/en/`
  8. @itochan itochan revised this gist Sep 1, 2013. 1 changed file with 3 additions and 2 deletions.
    5 changes: 3 additions & 2 deletions java_plus_you.rb
    Original file line number Diff line number Diff line change
    @@ -7,8 +7,9 @@
    def DOWNLOAD(today)
    puts "Free Java Download"

    # Work on OS X
    `open http://www.java.com/en/`
    if `uname`.chomp == "Darwin"
    `open http://www.java.com/en/`
    end
    end

    JAVA + YOU
  9. @itochan itochan created this gist Sep 1, 2013.
    15 changes: 15 additions & 0 deletions java_plus_you.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    require 'date'

    JAVA = 1
    YOU = 1
    TODAY = Date.today

    def DOWNLOAD(today)
    puts "Free Java Download"

    # Work on OS X
    `open http://www.java.com/en/`
    end

    JAVA + YOU
    DOWNLOAD TODAY