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
| ##### | |
| # Found on http://www.documentsnap.com/abbyy-finereader-and-snow-leopard-file-not-created-with-scansnap/ | |
| # and modified to work from command line and behave slightly differently. Creating an Automator script | |
| # to trigger should be trivial, though. you'd want to add a "cd /path/to/incoming_scans" at the top. | |
| # | |
| # Works with ScanSnap on Snow Leopard with the latest Abby Fine Reader and ScanSnap drivers. Doesn't | |
| # do the meta data munging though that should be trivial to add back in. | |
| # | |
| # Do you scanning all at once, then kick this script off when you leave your computer - this results in a | |
| # great speed up in workflow |
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 | |
| if `networksetup -getairportpower AirPort` =~ /On/ | |
| exec "networksetup -setairportpower AirPort off" | |
| else | |
| exec "networksetup -setairportpower AirPort on" | |
| end | |
| raise "Code here isn't very usefull" |
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 'spec_helper' | |
| class ::ParentDoc | |
| include MongoMapper::Document | |
| many :embedded_docs | |
| many :child_docs | |
| key :name, String | |
| end | |
| class ::EmbeddedDoc |
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
| user@server:~$ echo $PATH | |
| /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/company/com/bin/java6_32/bin:/company/com/bin/ant/bin:/company/com/bin/RDSCli/bin:/company/com/bin/CloudWatch/bin:/company/com/bin/ec2-api-tools/bin:/home/user/.rvm/bin |
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-1.9.2-p180 :006 > exit | |
| [clients-user@ip-10-83-118-38 workspace]$ cd .. | |
| [clients-user@ip-10-83-118-38 workspace]$ vi config | |
| config/ config.ru | |
| [clients-user@ip-10-83-118-38 workspace]$ vi config/ | |
| application.rb cucumber.yml database.yml.example environments/ locales/ | |
| boot.rb database.yml environment.rb initializers/ routes.rb | |
| [clients-user@ip-10-83-118-38 workspace]$ vi config/database.yml.example | |
| [clients-user@ip-10-83-118-38 workspace]$ irb | |
| ruby-1.9.2-p180 :001 > require 'pp' |
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
| execute "check file cache path" do | |
| command "ls #{Chef::Config[:file_cache_path]}" | |
| 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
| Species = DS.Model.extend({ | |
| name: DS.attr('string') | |
| }); | |
| Person = DS.Model.extend({ | |
| name: DS.attr('string'), | |
| species: DS.belongsTo(Species, { embedded: true }) | |
| tags: DS.hasMany(Tag, { embedded: true }) | |
| }); |
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
| module JasmineFixtures | |
| # Saves the markup to a fixture file using the given name | |
| def save_fixture(markup, name) | |
| fixture_path = File.join(Rails.root, '/tmp/js_dom_fixtures') | |
| Dir.mkdir(fixture_path) unless File.exists?(fixture_path) | |
| fixture_file = File.join(fixture_path, "#{name}.fixture.html.erb") | |
| File.open(fixture_file, 'w') do |file| | |
| file.puts(markup) | |
| 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
| class FileTransferJob | |
| def initialize(ftp_service = FtpService.new) | |
| @ftp_service = ftp_service | |
| end | |
| def do_the_needful | |
| @ftp_service.put("/tmp/the_file_to_send", "/tmp/the_destination") | |
| 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
| Sharing common code using a gem is a great idea, but it's painful to rapidly iterate in both codebases. | |
| What we settled on something like: | |
| if ENV['LOCAL_GEMS'] | |
| gem 'shared_stuff', :path => '~/workspace/shared_stuff' | |
| else | |
| gem 'shared_stuff, :github => 'mkocher/shared_stuff' | |
| end |
OlderNewer