This file contains 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
class Tool | |
def get_lastest() | |
Dir.glob("**/**/*.rb") do |filename| | |
puts "filename: #{filename},atime:#{File.stat(filename).atime}" | |
end | |
# get filename with most access time ##!! use min, but max | |
Dir.glob("**/**/*.rb").sort { |a, b| File.stat(a).atime <=> File.stat(b).atime }.min | |
end | |
end |
This file contains 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_relative "./ex_tool/lib/tool" | |
task :default => [:test] | |
task :test do | |
sh "bundle exec ruby ./ex/watir.rb" | |
end | |
task :la do | |
#ARGV[1] represents argument which you input. |
This file contains 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 "rubygems" | |
require "thor" | |
class ThorExample < Thor | |
desc "start", "start sever" | |
method_option :environment, :default => "development", :aliases => "-e", | |
:desc => "which environment you want server run." | |
method_option :daemon, :type => :boolean, :default => false, :aliases => "-d", | |
:desc => "running on daemon mode?" | |
def start |
This file contains 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 method1 | |
yield | |
end | |
method1 { puts 1+1 } |
This file contains 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
.wrap { | |
width: 600px; | |
margin: auto; | |
} | |
.content { | |
background: red; | |
float: left; | |
width: 450px; | |
} |
This file contains 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
@mixin size_col($width: auto, $height: auto, $background: #e3e3e3) { | |
width: $width; | |
height: $height; | |
background: $background; | |
} | |
.wrap { | |
min-width: 600px; | |
@include size_col(80%, auto, green); | |
margin: auto; |
This file contains 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 "fileutils" | |
task :default => [:new_web_proj] | |
task :new_web_proj => [:precheck, :clear, :js, :img, :css, :create_index, | |
:open_scss_watch] | |
task :precheck do | |
if Dir.glob("**") != ["Rakefile"] | |
puts "This Proj is not empty, Are you sure to delete all and rebuild a new |
This file contains 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
$file_path = 'd:/360cloud/tool/alias.psm1' | |
class Set_Alias | |
def create | |
p 'create' | |
file = File.new($file_path, 'a') | |
file.puts | |
file.puts "Function #{@ali} { #{@ori} }" | |
file.close | |
end |
This file contains 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
Dim ply As MapObjects2.Polygon | |
Dim rect As MapObjects2.Rectangle | |
'The DragRect sample implements a locator map that displays the | |
'current extent of a larger, main map in the same form. | |
'In addition, when the user clicks in the rectangle of the locator map, | |
'it can be dragged to a new location, forcing a change to the main map. | |
Dim g_feedback As DragFeedBack |
This file contains 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
/etc/fonts/conf.avail/90-synthetic.conf: needed for applications using Xft directly, e.g. Firefox, ... | |
/etc/mono/browscap.ini:[Mozilla/5.0 (SnapPreviewBot) Gecko/* Firefox/*] | |
/etc/mono/browscap.ini:[Mozilla/5.0 (Windows; U; Windows *; *; rv:*) Gecko/* Firefox/* webaroo/*] | |
/etc/mono/browscap.ini:[Mozilla/5.0 (Macintosh; U; *Mac OS X*; *; rv:1.*) Gecko/* Firefox/2.* Flock/1.*] | |
/etc/mono/browscap.ini:[Mozilla/5.0 (Windows; U; Win 9x 4.90; *; rv:1.*) Gecko/* Firefox/2.* Flock/1.*] | |
/etc/mono/browscap.ini:[Mozilla/5.0 (Windows; U; Windows NT 5.0*; *; rv:1.*) Gecko/* Firefox/2.* Flock/1.*] | |
/etc/mono/browscap.ini:[Mozilla/5.0 (Windows; U; Windows NT 5.1*; *; rv:1.*) Gecko/* Firefox/2.* Flock/1.*] | |
/etc/mono/browscap.ini:[Mozilla/5.0 (Windows; U; Windows NT 5.2*; *; rv:1.*) Gecko/* Firefox/2.* Flock/1.*] | |
/etc/mono/browscap.ini:[Mozilla/5.0 (Windows; U; Windows NT 6.0*; *; rv:1.*) Gecko/* Firefox/2.* Flock/1.*] | |
/etc/mono/browscap.ini:[Mozilla/5.0 (Windows; U; Windows NT 6.1*; *; rv:1.*) Gecko/* Firefox/2.* Flock/1.*] |
OlderNewer