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
Private Sub Workbook_SheetBeforeDoubleClick(ByVal Sh As Object, ByVal Target As Range, Cancel As Boolean) | |
Dim wsSheet As Worksheet | |
Application.ScreenUpdating = False | |
Select Case Range("H5") | |
Case "Hain" | |
For Each wsSheet In Worksheets | |
wsSheet.Visible = xlSheetHide | |
If wsSheet.Name Like "*Hain*" Or wsSheet.Name = "Customer Contacts" Or wsSheet.Name = "Retail Overview" Or wsSheet.Name = "Strategies & Decision Criteria" Or wsSheet.Name = "Leadtimes" Or wsSheet.Name = "Scorecard" Or wsSheet.Name = "Select Client Profile" Then |
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 start_request | |
method = http.post :body => { data: { serial_no: serial } } | |
method.errback do | |
yield | |
$stderr.puts 'Can\'t connect to cloud' | |
end | |
method.callback do | |
yield | |
p method.response_header.status |
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
# add to Gemfile | |
gem 'decent_exposure' # https://github.com/voxdolo/decent_exposure | |
gem 'responders' # https://github.com/plataformatec/responders |
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
#temporary for testing | |
## move the response file into your recipe as either a template or cookbook file | |
##FileUtils.cp(node[:response_file], File.join("#{tmpDir}","client")) | |
cookbook_file "#{tmp_dir}/oracle_response_file" | |
execute "oracleInstall" do | |
command "#{tmpDir}/client/setup.exe -silent -responseFile \"#{tmpDir}/client/Oracle11gR2_rsp.rsp\" -logLevel finest -ignoreSysPrereqs -noconsole" | |
action :run | |
not_if { ::File.exists?("C:/oracle/product/11.2.0/client_1/bin") } |
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
" Extra packages {{{ | |
Bundle "nono/vim-handlebars" | |
Bundle "leshill/vim-json" | |
Bundle "tpope/vim-bundler" | |
Bundle "fholgado/minibufexpl.vim" | |
Bundle "wavded/vim-stylus" | |
Bundle "altercation/vim-colors-solarized" | |
Bundle 'AutoTag' | |
Bundle "SuperTab" | |
" }}} |
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 self.create_from_parent(parent_type, parent_id, comment_params, current_account) | |
parent = parent_type.constantize | |
raise ActiveRecord::RecordNotFound unless parent.reflect_on_association(:comments).klass == self | |
parent.find(parent_id).comments.create(comment_params.merge(account: current_account)) | |
rescue NameError | |
raise ActiveRecord::RecordNotFound | |
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
<%= link_to "passes/Tara-Evans-01-10-2013.jpg", class: "example-image-link", data: {lightbox: "gallery"}, title: "Well done Tara, first time with only one minor" do %> | |
<%= image_tag("passes/Tara-Evans-01-10-2013.jpg", alt: "Tara Evans", width: "220", height: "147")%> | |
<p> | |
Tara Evans <br /> | |
Passed 1 October 2013 | |
</p> | |
</a> |
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 RiakWrapper | |
def initialize | |
walk_server = WalkServer.first | |
@client = Riak::Client.new(:protocol => "pbc", :host => walk_server.host, :pb_port => walk_server.pb_port) | |
end | |
def exists?(key, bucket_name) | |
bucket(bucket_name).exists?(key) | |
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
Failures: | |
1) Micropost should not be valid when user_id is not present | |
Failure/Error: it { should_not be_valid } | |
expected #<Micropost id: 1, content: "lorem ipsum", user_id: 1, created_at: "2013-10-09 11:10:10", updated_at: "2013-10-09 11:10:10"> not to be valid |
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
respond_to do |format| | |
format.html | |
format.xls do | |
render :xls => "some_filename", :template => "reports/#{params[:id]}.xls.writeexcel" | |
end | |
end |
NewerOlder