Skip to content

Instantly share code, notes, and snippets.

@ziyadbasheer
ziyadbasheer / aide-simple-ecommerce-integration-spec
Created January 21, 2025 15:27
simple ecommerce integration spec based on our code for shopify and woocommerce and arlo
swagger: '2.0'
info:
title: Aide Ecommerce Integration API
description: API specification for integrating ecommerce platforms with Aide
version: '1.0.0'
schemes:
- https
consumes:
- application/json
#Resource/Record in question
class Space < ApplicationRecord
resourcify
end
#User model
class User < ApplicationRecord
rolify
end
Ziyads-MacBook-Air:mattersource-app ziyadbasheer$ bundle install
Fetching https://github.com/rails/sass-rails.git
Fetching https://github.com/activerecord-hackery/ransack.git
Fetching gem metadata from http://rubygems.org/..........
Fetching gem metadata from http://rubygems.org/................
Fetching gem metadata from http://rubygems.org/................
Resolving dependencies....
Bundler could not find compatible versions for gem "actionpack":
In Gemfile:
rails (= 6.0.0.rc1) was resolved to 6.0.0.rc1, which depends on
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
ruby '2.6.2'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.2.3'
# Use sqlite3 as the database for Active Record
gem 'pg'
# Use Puma as the app server
def detail(request, product_id):
p = Product.objects.get(pk=product_id)
return render(request, 'products/detail.html', {'product': p})
def create(request):
if request.method == 'POST':
form = ProductForm(request.POST) # A form bound to the POST data
if form.is_valid(): # All validation rules pass
new_product = form.save()
class RegistrationsController < Devise::RegistrationsController
prepend_view_path 'app/views/devise'
def create
super
session[:omniauth] = nil unless resource.new_record?
build_resource

Designing feedback in Writers on Writing Giving feedback is a trade-off between pleasing the solicitor and the comprehensiveness and quality of the feedback—negative criticism is likely to repulse the solicitor and cause them to shun your advice. Hence, determining their receptiveness is a very important factor when dec… Consciously navigating life in Unforgettable Moments It’s always easier to resort to the defaults and leave it to leave to take you wherever it might. But that isn’t the key to greatness. It’s the highway to mediocrity. Unaesthetic design in This Happened to Me The meaning and connotations of design are constantly debated. Consider the example of the Kit-Kat Clock. It is ugly, creepy even.. But it’s different. It sparks discussion, and so on. I suppose this borders on the “art” side of design. Novelty and convention

from math import floor
v = 2520
total = 0
words = {1: v}
for k, v in words.items():
while k < 900:
k+= 1
words[k] = floor(v/k)
function domTreeTraverse(element) {
var lead = document.getElementsByTagName(element);
console.log(lead);
var OpenList = new Array();
var depth = 0;
var pdepth = {
fun fac (0 : IntInf.int) = 1 : IntInf.int
| fac 1 = 1
| fac n = n * (fac (n-1))
fun sumDigits' [] = 0 : IntInf.int
| sumDigits' (h::t) =
case IntInf.fromString (String.str h) of
NONE => raise (Fail "Invalid digit")
| SOME x => x + sumDigits' t
fun sumDigits d = sumDigits' (String.explode (IntInf.toString d))
fun find8001 8001 n = (n - 1)