Skip to content

Instantly share code, notes, and snippets.

@qr8r
qr8r / contracts.md
Last active May 9, 2019 20:00
Some edge case examples for the contract id backfill

Example of Shop with Demo contracts

payable - 666080606 contract ids - 2352807,6900673,6900772

Example of shop with backdated contracts

payable id - 231508108 contract ids - 2046825,2046827,1886964,1883304,1824774,2042013

Example a new contract was signed after the initial term without terminating the initial deal:

payable_id - 379857097

@qr8r
qr8r / solidus_store_project.md
Last active June 20, 2017 22:30
Build a Rails Web app powered by Solidus

Solidus Web app

The goal of this project is to make a simple chess web app. It should include a simple CRUD interface for 2 users to play a chess game. This should be an MVP style project so the simpler the better. We can always add more complicated behaviour as we go along.

After you're comfortable with the basics of rails we're going to add in a solidus store to sell some cool chess gear as well.

All work should be properly version controlled on Github. All application code should be tested for 100% code coverage.

Here are some interesting resources which might be helpful:

@qr8r
qr8r / gist:5ec07e4e6da4eb1d55704d60da90ceb6
Last active June 12, 2017 16:10
Frontend reading list
https://maintainablecss.com/chapters/semantics/
http://heydesigner.com/blog/anatomy-grid/
https://gist.github.com/dypsilon/5819504
http://chir.ag/projects/name-that-color/#6195ED
class FooStuff
has_one :thang
end
class Thang
belongs_to :foo_stuff
validates :foo_stuff, presence: true
end
FactoryGirl.define do
SRC_DIR := src
BUILD_DIR := build
BIN_DIR := bin
SOURCES := $(patsubst $(SRC_DIR)/%,%,$(shell find $(SRC_DIR) -name *.cpp))
OBJECTS := $(SOURCES:.cpp=.o)
out: $(OBJECTS)
g++ $(BUILD_DIR)/$< -o $(BIN_DIR)/$@
@qr8r
qr8r / keybase.md
Created April 26, 2016 19:04
keybase.md

Keybase proof

I hereby claim:

  • I am brendandeere on github.
  • I am brendandeere (https://keybase.io/brendandeere) on keybase.
  • I have a public key ASClv83ffrko5IY7OF9r_-RLqbqC6p9hejxNV58ycHjsiAo

To claim this, I am signing this object:

@qr8r
qr8r / db.rake
Created November 9, 2015 00:15 — forked from hopsoft/db.rake
Rails rake tasks for dump & restore of PostgreSQL databases
# lib/tasks/db.rake
namespace :db do
desc "Dumps the database to db/APP_NAME.dump"
task :dump => :environment do
cmd = nil
with_config do |app, host, db, user|
cmd = "pg_dump --host #{host} --username #{user} --verbose --clean --no-owner --no-acl --format=c #{db} > #{Rails.root}/db/#{app}.dump"
end
puts cmd
filters: ->
filters = SearchSpring.jQuery.address.parameterNames()
filters =
for filter in filters
match = filter.match(/^filter\.(.+)/)
match[1] if match?
(filter for filter in filters when filter?)
var fields = ["frame_color", "frame_design", "lens_color", "lens_type"];
SearchSpring.jQuery("#searchspring .productItem").each(function() {
var matches = [];
for (i in fields) {
var v = decodeURIComponent(SearchSpring.jQuery.address.parameter("filter." + fields[i]));
if (v != "undefined" && v != "null") {
for (i in matching_skus) {
var match_position = SearchSpring.jQuery.inArray(matching_skus[i], matches);
if (match_position >= 0) {
matches.splice(0, 0, this.splice(match_position, 1)[0]);
} else {
matches.push(matching_skus[i]);
}
}