Skip to content

Instantly share code, notes, and snippets.

View dlferro's full-sized avatar

Daniel Ferro dlferro

View GitHub Profile
import { LightningElement, track } from 'lwc';
export default class HelloIteration extends LightningElement {
@track
contacts = [
{
Id: 1,
Name: 'Amy Taylor',
Title: 'VP of Engineering',
},
{
@dlferro
dlferro / Interaction.json
Created August 9, 2017 21:13
Sample Interaction with Goal
{
"key": "ixn-created-via-the-api",
"name": "API-Created journey",
"workflowApiVersion": 1.0 ,
"triggers": [],
"goals": [
{
"key": "user-defined-key",
"name": "name of your goal",
"description": "The description of this goal",
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<style type="text/css">
body {
background-color: white;
@dlferro
dlferro / gist:480ef885fa4744681976
Last active August 29, 2015 14:17
Randomizing Offers
%%[
SET @randomVal = RANDOM(0, 100)
if randomVal < 60 THEN
// display offer for 15% off
ELSE IF randomVal < 20 THEN
// display offer for 25% off
ELSE IF randomVal < 15 THEN
// display offer for 30% off
ELSE IF randomVal < 5 THEN
<html>
<head>
<script type="text/javascript">
App.ApplicationAdapter = DS.RESTAdapter.extend({
host: 'http://127.0.0.1:8000/api/content',
headers: function() {
return {'X-CSRFToken': $('meta[name="csrf-token"]').attr('content')};
}.property("session.authToken")
});
@dlferro
dlferro / gist:d826b8da5f418d9c8317
Created October 7, 2014 18:47
Application Controller
App.ApplicationController = Em.ArrayController.extend({
itemController: 'socialItem',
unapprovedItems: function() {
return this.get('model').filterProperty('state', 0);
}.property('model.@each.state'),
});
module ApiPagination
Infinity = 1.0/0
class Range < Grape::Validations::SingleOptionValidator
def validate_param!(attr_name, params)
unless (!@required && params[attr_name].nil?) || @option.include?(params[attr_name])
throw :error, status: 400, message: "#{attr_name}: must be within #{@option}"
end
end
end
@dlferro
dlferro / Drupal
Created February 28, 2014 03:24
ExactTarget Digital Marketing style guides.
TODO
<html>
<head>
</head>
<body>
<div id="post">
<p id="test" data-textannotation-id="3a850d8670a8255343a9451b42f53eb3">Derrick Rose underwent a successful repair of his medial meniscus today. That's the good news. The bad news is that the Bulls have announced that Rose is done for the season.</p>
<p data-textannotation-id="ca49ebe0a4b38a6785a22c3fe1343c84">The long return time for Rose likely means that he had the meniscus repaired, instead of removed, all together or partially. That it could be salvaged is a good sign for future recovery, but that procedure takes longer to recover.</p>
<aside data-ids="482818589">RELATED
<div>
import com.francisli.processing.http.*;
import processing.serial.*;
Serial myPort; // The serial port
int value = 0;
float oldValue;
PFont InstagramFont;