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
{ | |
"error": { | |
"summary": "Dead lock timeout", | |
"flow": "My Quickbooks flow", | |
"flow_id": "abc123", | |
"count": 10, | |
"created_at": "Some time", | |
"connection": "Quickbooks", | |
"connection_id": "abc123", | |
"webhook": "Add Products", |
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
// Include gulp | |
var gulp = require('gulp'); | |
// Include Our Plugins | |
var jshint = require('gulp-jshint'); | |
var concat = require('gulp-concat'); | |
var uglify = require('gulp-uglify'); | |
var rename = require('gulp-rename'); | |
var tmplte = require('gulp-jstemplater'); |
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 'lotus-controller' | |
require 'byebug' | |
module Feature | |
def self.create(str) | |
str.reverse | |
end | |
end | |
module Sack |
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
# Uncomment this if you reference any of your controllers in activate | |
# require_dependency 'application' | |
module CameraFields | |
def add_camera_fields | |
@additional_product_fields += [ | |
{:name => 'Cline Price'}, | |
{:name => 'Cost'}, |
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 AddProductFields < ActiveRecord::Migration | |
def self.up | |
add_column :products, :cline_price, :decimal, :precision => 8, :scale => 2 | |
add_column :products, :cost, :decimal, :precision => 8, :scale => 2 | |
add_column :products, :manufacturers_sku, :string | |
add_column :products, :code, :string | |
add_column :variants, :cline_price, :decimal, :precision => 8, :scale => 2 | |
add_column :variants, :cost, :decimal, :precision => 8, :scale => 2 | |
add_column :variants, :manufacturers_sku, :string |
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
namespace :lightmine do | |
task :export => :environment do | |
project = Project.find_by_name('Spree', :include => {:issues => [:fixed_version, :author]}) | |
versions = [] | |
project.versions.each do |version| | |
version_export = {} | |
version_export.merge! version.attributes.delete_if { |k,v| !%w{id name description}.include? k} |
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 'rubygems' | |
require 'builder' | |
def add_directory(path, parent, name) | |
parent.dict do |dict| | |
dict.key "name" | |
dict.string name #"#{name} (#{path})" | |
dict.key "regexFolderFilter" | |
dict.string "!.*/(\\.[^/]*|CVS|_darcs|_MTN|\\{arch\\}|blib|.*~\\.nib|.*\\.(framework|app|pbproj|pbxproj|xcode(proj)?|bundle))$" | |
dict.key "sourceDirectory" |
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
OrdersController#create (disable protect_from_forgery in BaseController) | |
ab -c 1 -n 5 -p params.txt -T application/x-www-form-urlencoded http://127.0.0.1:3000/orders/ | |
params.txt = variants[429921481]=1 | |
To test the checkout controller, step through checkout until last step in browser and re-user the order number in the ab commands below. First ensure check_roles returns true in role_requirement_system.rb. | |
Address Step | |
ab -c 1 -n 5 http://127.0.0.1:3000/orders/R044784352/checkout/edit?step=address |
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 'rubygems' | |
require 'diffy' | |
require 'nokogiri' | |
require 'cgi' | |
module Deface | |
class Parser | |
# converts erb to markup | |
# |
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
<% if Rails.env.development? %> | |
<% DefaceEditor::Theme.active.each do |theme| %> | |
<% theme.stylesheets.each do |stylesheet| %> | |
<style id="<%= stylesheet.name %>"> | |
<%= stylesheet.css %> | |
</style> | |
<% end %> | |
<% theme.javascripts.each do |javascript| %> | |
<script type="text/javascript" id="<%= javascript.id %>"> |
OlderNewer