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
unit = UnitId("player") | |
power = UnitPower(unit, "FURY") |
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
"Ty: READY | |
adam: Yes | |
adam: Get ready to get plowed in Ur ass Tyler | |
Ty: 2 in the pink, 1 in the stink. LEGGGOOOO | |
adam: Who r u a fan of | |
Ty: Giants but they are going to suck | |
adam: No they aren't | |
adam: Cruz is back | |
Champ: cruz is done | |
R-Dot: the |
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
ActiveRecord::Base.connection.tables.each{ |table| | |
headers = ActiveRecord::Base.connection.execute("Select * from #{table} LIMIT 1").fields | |
CSV.open("#{table}.csv", "wb") do |csv| | |
csv << headers | |
ActiveRecord::Base.connection.execute("Select * from #{table}").each{ |row| | |
csv << row | |
} | |
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
context "creating stripe subscribe customer" do | |
before(:each) do | |
Stripe::Plan.stub(:create) {"1"} | |
@plan = Fabricate(:plan, skip_callbacks: true) | |
@organization = Fabricate(:organization) | |
end | |
it "should fail to create subscription and catch exception" do | |
@subscription = Fabricate.build(:subscription, plan: @plan, organization: @organization) | |
customer = double("customer") |
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 new | |
@contact = Contact.new | |
@address = Address.new | |
@e_mail_address = EMailAddress.new | |
@phone_number = PhoneNumber.new | |
@addresses = Address.find(:all) | |
@e_mail_addresses = EMailAddress.find(:all) | |
@phone_numbers = PhoneNumber.find(:all) | |
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
$(function () { | |
$("#setFeesToPaid").click(function () { | |
var checkedUnPaidFees = $("input[name=paid]:checked"); | |
if (checkedUnPaidFees.length > 0) { | |
$.ajax({ | |
url: "/Fees/SetFeesToPaid", | |
type: "POST", | |
dataType: "JSON", | |
data: JSON.stringify(collectCheckBoxIds(checkedUnPaidFees)), | |
contentType: 'application/json; charset=utf-8', |
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 'csv' | |
f = File.open("churches.csv", "r") | |
csv_string = "" | |
import_string = CSV.generate do |csv| | |
CSV.foreach(f, :encoding => 'windows-1251:utf-8') do |row| | |
if row[1] && row[1].length == 8 | |
if row[5] | |
address = row[5].gsub(/(?<!^|,)"(?!,|$)/, '') | |
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
<%= label_tag("currencies", "Currency:") %> | |
<%= f.select :currency_conversion_code, {} , {prompt: "Currency Selection"}, {:class => "currencies"} %> |
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
let(:task1) { create(:task, :user => @u) } | |
let(:do_action) { delete :destroy, :id => task1.id } | |
it "should find the task" do | |
do_action | |
assigns[:task].should eq(task1) | |
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
function AttachCheckBoxListOnClickEvent(controlId) { | |
$("#" + controlId + " input").click(function () { | |
if ($(this).parent().find('input:checkbox:first').is(':checked')) { | |
if ($(this).is('checked') == false) { | |
$("#" + testStageCheckListControlId + " tbody td:first-child input:checkbox").removeAttr('checked'); | |
} | |
else { | |
SelectAllCheckBoxes(controlId, true); | |
} | |
} |