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
secret_token: { rake secret hash } | |
secret_key: { rake secret hash } |
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
<%= simple_form_for(@invoice) do |f| %> | |
<%= f.error_notification %> | |
<div class="form-inputs"> | |
<%= f.input :address_sender %> | |
<%= f.input :address_recipient %> | |
<%= f.simple_fields_for :invoice_line_items do |invoice_line_items_form| %> | |
<div class="duplicatable_nested_form"> | |
<%= invoice_line_items_form.input :description %> | |
<%= invoice_line_items_form.input :price %> |
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
params[:url]="http:google.com+42min" | |
expire = params[:url].gsub!(/\+(\d+)min/) #=> <MatchData "+42min" 1:"42"> |
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
context 'something went wrong' do | |
it 'raises an exception and returns 422 Unprocessable Entity' do | |
@klass = controller.send(:base_class) | |
allow(@klass).to receive(:recover!).with(@organization.id).and_raise(::Extension::ActiveRecord::Paranoia::RecordNotRestored) | |
put :restore, format: :json, id: @organization.id | |
expect(response.status).to eq(422) | |
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
require 'simplecov' | |
SimpleCov.command_name "acceptance" | |
ENV["RAILS_ENV"] ||= 'test' | |
require File.expand_path("../../config/environment", __FILE__) | |
require 'rspec/rails' | |
require 'rspec/autorun' | |
require 'capybara/rails' | |
require 'capybara/poltergeist' |
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
Prawn::Document.generate(prawn_file) do | |
y = 790 | |
79.times do | |
x = -30 | |
58.times do | |
bounding_box([x,y], :width => 10, :height => 10) do | |
stroke_color '000000' | |
stroke_bounds | |
text_box "#{x}", :size => 5, :at=> [0,10], :width => 10, :height => 10, color: 'ff0000' if y == 790 | |
text_box "#{y}", :size => 5, :at=> [0,10], :width => 10, :height => 10, color: 'ff0000' if x == -30 |
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
Verifying that +denym_ is my blockchain ID. https://onename.com/denym_ |
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
fixed_properties = {event_id: x, something: 'blub'} | |
clean_fixed_properties = fixed_properties | |
clean_fixed_properties.keys.each do |key| | |
clean_fixed_properties.delete(key) unless relation_klass.column_names.include?(key) | |
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
code = "" | |
files = FileExt.ls_r(path) | |
code = code <> " " <> Enum.each files, fn(file) -> | |
File.read! file | |
|> join_code | |
|> String.codepoints | |
end | |
Logger.info(code) #=> is empty since code got assigned inside of Enum.each. Its supposed to be all strings that are read from the files merged together. |
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
var hideSmall = false; | |
var hideSmallAmountInterval; | |
$(function() { | |
$('.chat-button').before('<li class="hideSmallNav">Hide small amount <input type="text" value="0.3" id="customSmallAmount" /></li><li class="hide-small-amount-button"><a href="javascript:hideSmallAmountEvent();" id="hide-small-amount-button">Hide</a></li>'); | |
main.EtherDelta.refreshInterval = 1000; | |
displayGasPrice(); | |
}); | |
function hideSmallAmount() { |
OlderNewer