Skip to content

Instantly share code, notes, and snippets.

@jordanisip
jordanisip / waypointAxiosExample.tsx
Last active June 14, 2023 13:57
Waypoint Axios example
const axios = require('axios');
axios({
method: 'post',
url: 'https://live.waypointapi.com/v1/email_messages',
headers: {
'Content-Type': 'application/json'
},
auth: {
username: 'YOUR_API_KEY_USERNAME',
await marketbaseClient.events.createHistory({
"channelMetaId": "order_8161667227078356",
"body": "Reservation created"
});{
"data": {
"id": "ev_e4NvtCbM75MHBu8W",
"type": "HistoryEvent",
"createdAt": "2022-10-31T14:37:59.985Z",
"updatedAt": "2022-10-31T14:37:59.985Z",
"body": "Reservation created",
<html>
<head>
<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Tangerine|Inconsolata|Droid+Sans">
</head>
<style type="text/css">
h1 { font-family: 'Tangerine', serif; }
p { font-family: 'Inconsolata'; }
ul { font-family: 'Droid Sans';}
</style>
<body>
// Checks the browser and adds classes to the body to reflect it.
$(document).ready(function(){
var userAgent = navigator.userAgent.toLowerCase();
$.browser.chrome = /chrome/.test(navigator.userAgent.toLowerCase());
// Is this a version of IE?
if($.browser.msie){
$('body').addClass('ie');
// Fonts
!body_font = "Helvetica", "Arial", "sans-serif"
// Font Sizing based off of YUI Guidelines
!size_10 = 77%
!size_11 = 85%
!size_12 = 93%
!size_13 = 100%
!size_14 = 108%
!size_15 = 116%
html
color: #000
background: #FFF
body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, code, form, fieldset, legend, input, textarea, p, blockquote, th, td
margin: 0
padding: 0
@import variables
html,body
:font-family = !body_font
:color = !text_color
h1
:font-size = !size_27
:letter-spacing -2px
/* ============================= */
/* = Based off of the 1Kb Grid = */
/* ============================= */
!column_width = 30
!column_gutter = 10
!number_of_columns = 24
=push(!columns)
margin-left = (!column_width * !columns) + (!column_gutter * (!columns - 1)) + "px"
module Ramaze
module Helper
module Grid
LOOKUP << self
def grid_unit options={}, &block
haml_tag :div, {:id => options[:id], :class => "yui-u#{ ' first' if options[:first] }"} do
block.call
end
end
end
===VIEW===
<%- form_for @credential, user_external_credentials_path(@user), :class => "horizontal" do -%>
<div class="input-wrapper">
<%= f.label :login, "Twitter Username" -%>
<%= f.text_field :login, :class => 'text' -%>
</div>
<div class="input-wrapper">
<%= f.label :password, "Twitter Password" -%>