What?! No QWERTY keyboard?
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
| #!ruby | |
| VALID_SPEED_DESCRIPTORS = %w(slow medium fast unlimited 0 10 20 30 40 50 60 70 80 90 100) | |
| def applescript_for_speed(descriptor) | |
| speed = case descriptor.to_s.downcase | |
| when "slow" | |
| "20" | |
| when "medium" | |
| "40" |
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
| tell application "System Preferences" | |
| activate | |
| end tell | |
| tell application "System Events" | |
| tell process "System Preferences" | |
| set visible to true | |
| click menu item "Backblaze Backup" of the menu "View" of menu bar 1 | |
| click button "Settings..." of the first group of the window "Backblaze Backup" | |
| --return every UI element of tab group 1 of front sheet of front window |
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 'rubygems' | |
| require 'w3c_validators' | |
| validator = W3CValidators::CSSValidator.new | |
| validator.set_profile!(:css2) | |
| fp = '/path/to/cssfile.css' | |
| results = validator.validate_file(fp) | |
| puts results.errors | |
| puts results.warnings.size |
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
| - verify Fidelity Bond documents transfer to production IR server, get imported | |
| - verify Agency documents transfer to production IR server, get imported | |
| - verify Diary Items transfer to production IR server, get imported | |
| - verify hyperlinks to open a file in IR work (web page open, Desktop file changes/opens) | |
| - verify hyperlinks to open a file from IR work (Desktop file open, web page changes) |
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
| Contract Bond Factory | |
| FactoryGirl.build(:contract_bond) | |
| --> Principal | |
| --> Appointed Agency | |
| --> contract_underwriter | |
| --> User | |
| --> Domino User | |
| --> Assistant |
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
| #!/usr/bin/ruby | |
| ioreg_data = IO.popen("ioreg -w0 -l").readlines().join | |
| ioreg_data.sub!(/.*(\+\-o AppleSmartBattery.*?\+\-o).*/m, '\\1') | |
| ioreg_data.gsub!(/\s+\|/, "") | |
| ioreg_data.gsub!(/\s\s+/, "\n") | |
| battery = Hash.new | |
| ioreg_data.split(/\n+/).each do |line| | |
| key, value = line.split(' = ')[0..1] | |
| next if key.nil? || value.nil? |
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
| Bundler command complained of not being able to find bundle1.o although I could easily locate it within /usr/lib myself. | |
| Damn computers. | |
| gem install rdiscount -- --with-ldflags="-L/usr/lib" |
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
| # Date and Time symbol meanings: | |
| %a - The abbreviated weekday name (``Sun'') | |
| %A - The full weekday name (``Sunday'') | |
| %b - The abbreviated month name (``Jan'') | |
| %B - The full month name (``January'') | |
| %c - The preferred local date and time representation | |
| %d - Day of the month (01..31) | |
| %H - Hour of the day, 24-hour clock (00..23) | |
| %I - Hour of the day, 12-hour clock (01..12) |
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
| # courtesy of http://codepad.org/tBON208e | |
| $_ = "1,2,3,8,9,12,15,17,18,19,20,21,22,23"; | |
| s/(?<!\d)(\d+)(?:,((??{$++1})))+(?!\d)/$1-$+/g; | |
| print; |
