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
const machine = Machine( | |
{ | |
initial: 'intro', | |
context: { | |
title: '', | |
ctaTitle: '', | |
}, | |
states: { | |
intro: { | |
on: { |
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
const machine = Machine( | |
{ | |
initial: 'intro', | |
context: { | |
title: '', | |
ctaTitle: '', | |
}, | |
states: { | |
intro: { | |
on: { |
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
SSLProxyEngine On | |
AddOutputFilterByType DEFLATE text/html text/plain text/css text/css text/javascript application/javascript | |
AddOutputFilterByType INFLATE text/xml text/xsl | |
BrowserMatch ^Mozilla/4 gzip-only-text/html | |
BrowserMatch ^Mozilla/4\.0[678] no-gzip | |
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html | |
<IfModule dir_module> | |
DirectoryIndex index.html index.php | |
</IfModule> | |
Redirect /wp-admin/install.php https://maintenance.food.ee |
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
with formated_order_items as ( | |
select oi.id, | |
o.id as order_id, | |
oi.quantity, | |
(string_agg(oi.quantity || ' - ' || mi.name, CHR(10))) as description, | |
string_agg(mog.verb || ' ' || moi.name, ',') as pickles, | |
string_agg(dt.name, ',') as dietary_tags | |
from order_items oi | |
join menu_items mi on oi.menu_item_id = mi.id | |
join order_item_menu_option_items oimoi on oi.id = oimoi.order_item_id |
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
// use ember-expose-global and replace MyAppName with you | |
Cypress.Commands.add("getStore", () => { | |
return cy | |
.window() | |
.then((win) => cy.wrap(win.MyAppName.__container__.lookup('service:store'))); | |
}); | |
/** | |
* Create Record | |
* @param {string} Record Name |
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
// use ember-expose-global and replace MyAppName with you | |
Cypress.Commands.add("getStore", () => { | |
return cy | |
.window() | |
.then((win) => cy.wrap(win.MyAppName.__container__.lookup('service:store'))); | |
}); | |
/** | |
* Create Record | |
* @param {string} Record Name |
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
Cypress.Commands.add("settleAppPromises", () => { | |
return cy.window() | |
.then(win => cy.waitUntil(() => win.SwiftFox.__container__.lookup('service:settledPromiseQueue').isEmpty)); | |
}); | |
Cypress.Commands.overwrite('click', (originalFn) => { | |
cy.settleAppPromises(); | |
return originalFn(); | |
}); |
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
const closed = 2; | |
const closed_2 = 3; | |
[1,2,3] | |
.filter(_ => _ > closed) | |
.map(_ => _ * closed_3); |
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
module Accounting | |
module Adapters | |
class ClientOrder < Adapter | |
alias_attribute :ledger, :invoice | |
def initialize(order) | |
raise ArgumentError, 'ClientOrder must adapt an order ' unless order.is_a? Order | |
super(order) | |
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
class JrClientGenerator < Rails::Generators::Base | |
source_root File.expand_path('../templates', __FILE__) | |
def self.process_resource(resource_klass) | |
attributes = resource_klass._attributes.clone | |
model_klass = resource_klass._model_name.safe_constantize | |
# We only want the type value from each column, and we also need | |
# to convert the key to a symbol, if you're using non AR records to back | |
# your JR model, its not going to have an attribute hash, so lets just |
NewerOlder