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
1) MirrorSync#execute_custom_script when the custom script succesfully runs should not raise any errors | |
Failure/Error: expect { mirror_sync.execute_custom_script('false') }.to_not raise_error | |
expected no Exception, got #<NameError: undefined local variable or method `e' for #<MirrorSync:0x00005601c08bce60>> with backtrace: | |
# ./spec/models/mirror_sync_spec.rb:9:in `execute_custom_script' | |
# ./spec/models/mirror_sync_spec.rb:20:in `block (5 levels) in <top (required)>' | |
# ./spec/models/mirror_sync_spec.rb:20:in `block (4 levels) in <top (required)>' |
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
ruby test.rb 'puts "42"' | |
evaluating next: puts "42" | |
{:result=>nil, :output=>"42\n"} | |
ruby test.rb '1+1' | |
evaluating next: 1+1 | |
{:result=>2, :output=>""} |
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 'boot' | |
require 'rails/all' | |
# Require the gems listed in Gemfile, including any gems | |
# you've limited to :test, :development, or :production. | |
Bundler.require(*Rails.groups) | |
module ArkMonitor | |
class Application < Rails::Application |
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
finished = true | |
timer = EM::PeriodicTimer.new(5) do | |
if finished | |
finished = false | |
method = http.post :body => { data: { serial_no: serial } } | |
method.errback { $stderr.puts 'Can\'t connect to cloud'; finished = true } | |
method.callback do | |
finished = true | |
p method.response_header.status | |
p method.response_header |
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
upstream dummy.us { | |
server unix:/home/dummyus/deploy/dummyus/tmp/puma.sock; | |
} | |
server { | |
listen 255.255.255.256:80; | |
listen [1111:1111:1111:1111::256]:80; | |
server_name dummy.us www.dummy.us; |
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
form | |
input: name | |
nav-navtabs | |
cow | dog | cat | |
nav-content | |
cow | |
fields_for :cow | |
... | |
dog | |
fields_for :dog |
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
% Encoding: windows-1252 | |
@Comment{jabref-meta: databaseType:bibtex;} | |
@Comment{jabref-meta: saveOrderConfig:specified;bibtexkey;false;author;false;title;false;} | |
@Comment{jabref-meta: selector_journal:Agrarwirtschaft;Computational Statistics \\\\\\\\& Data Analysis;Jahrb{\\\\\\\\"u}cher f{\\\\\\\\"u}r National{\\\\\\\\"o}konomie und Statistik;} |
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 Book < ApplicationRecord | |
has_and_belongs_to_many :categories | |
validates :categories, presence: true | |
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
http://catalog.update.microsoft.com/v7/site/ScopedViewRedirect.aspx?updateid=87a7756f-1451-45da-ba8a-55f8aa29dfee | |
$ cabextract 20662520_6c535fbfa9dca0d07ab069e8918896086e2af0a7.cab | |
$ hex2hcd BCM20702A1_001.002.014.1443.1572.hex | |
# cp BCM20702A1_001.002.014.1443.1572.hcd /lib/firmware/brcm/BCM20702A1-0a5c-216f.hcd | |
# may not be necessary | |
# ln -rs /lib/firmware/brcm/BCM20702A1-0a5c-216f.hcd /lib/firmware/brcm/BCM20702A0-0a5c-216f.hcd |
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 StreamingCsvController < ApplicationController | |
def test | |
respond_to do |format| | |
format.csv {render_csv} | |
end | |
end | |
private | |
def render_csv | |
set_file_headers |
NewerOlder