Skip to content

Instantly share code, notes, and snippets.

View simonexmachina's full-sized avatar

Simon Wade simonexmachina

  • Melbourne, Australia
View GitHub Profile
### Keybase proof
I hereby claim:
* I am simonexmachina on github.
* I am simonexmachina (https://keybase.io/simonexmachina) on keybase.
* I have a public key ASBa1zVtAXZuy9wBN3OSRPQxYqgByvm7qUo_TN0vKfhiLAo
To claim this, I am signing this object:

We submit a document to Lilt for translation with the following process:

  1. Create a document on Lilt and get the document_id from the response:
    POST https://lilt.com/2/documents/files
    LILT-API: {"project_id"=project_id,"name"="filename"}
    Content-Type: application/octet-stream
    
  2. Wait for the document import to complete (until the response indicates that import_in_progress is false):
"{\"packages/elements-storefront/src/components/PromotionalSpots/TemplateKitsPromotion/translations/translations.ru.js\":{\"newFeature\":\"NEW RELEASE\",\"heading\":\"Code-Free Websites\",\"subheading\":\"Template Kits are the easier, faster & flexible way to create WordPress websites.\",\"ctaText\":\"Discover Template Kits\"}}"
"{\"packages/elements-storefront/src/components/PromotionalSpots/TemplateKitsPromotion/translations/translations.de.js\":{\"newFeature\":\"NEW RELEASE\",\"heading\":\"Code-Free Websites\",\"subheading\":\"Template Kits are the easier, faster & flexible way to create WordPress websites.\",\"ctaText\":\"Discover Template Kits\"}}"
"{\"packages/elements-storefront/src/components/PromotionalSpots/TemplateKitsPromotion/translations/translations.es-419.js\":{\"newFeature\":\"NEW RELEASE\",\"heading\":\"Code-Free Websites\",\"subheading\":\"Template Kits are the easier, faster & flexible way to create WordPress websites.\",\"ctaText\":\"Discover Template Kits\"}}"
"{\"packages/elements-store
@simonexmachina
simonexmachina / form-tracking.js
Last active May 13, 2020 12:57
Improving Elements Analytics - Proof of Concept
// Run addDataLayerTracking for each form to be tracked
// When the user enters invalid information call trackValidationError
export function addFormTracking(form) {
form.addEventListener('change', ev => {
let option = null
if (input.type == 'checkbox') {
option = input.checked ? 'Checked' : null
}
else if (input.type == 'radio') {
option = input.dataset.trackingLabel
class UsefulSearchesService {
async init() {
this.data = await this.fetchData()
}
async get(params) {
setInterval(() => this.handleRefresh(), 0)
return this.data[params]
}
async handleRefresh() {
if (this.shouldRefresh()) {
export default {
pageTitle: "Hello! World",
metaDescription: "Batman",
topArticle: <div></div>
}

Keybase proof

I hereby claim:

  • I am simonexmachina on github.
  • I am aexmachina (https://keybase.io/aexmachina) on keybase.
  • I have a public key whose fingerprint is C99E 8EA3 9A10 90C7 5D71 6D67 D63F 6167 31A6 C4BD

To claim this, I am signing this object:

diff --git a/client/shared/components/filterList/filterList.js b/client/shared/components/filterList/filterList.js
index a2c459d9..203332fe 100644
--- a/client/shared/components/filterList/filterList.js
+++ b/client/shared/components/filterList/filterList.js
@@ -79,9 +79,7 @@ const FilterList = ({ FilterItem, parsedLocation, param, className }) => {
const maxParamFormatValue = filterParamsConfig[param].format
? filterParamsConfig[param].format(maxParamValue)
: maxParamValue
- const priceDisplayName = `${minParamFormatValue} - ${
- maxParamFormatValue
@simonexmachina
simonexmachina / controllers.application.js
Last active October 3, 2016 23:57
computed.sort length
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
rowsSorting: ['name:desc'],
rows: [{name: 'a'}, {name: 'b'}, {name: 'c'}, {name: 'd'}],
sortedRows: Ember.computed.sort('rows', 'rowsSorting'),
actions: {
addRow() {
let rows = this.get('rows')

Mobile Giving Foundation

References

prod Environment