Skip to content

Instantly share code, notes, and snippets.

@jeremysuriel
jeremysuriel / desk-oauth-example-single.php
Created May 1, 2012 01:05
Desk.com Single Access Token API - PHP Example
<?php
//
// Desk.com Single Access Token API Example
//
// 1) Copy this file to the root of your webserver and change the $my_desk_url variable to point to your desk.com hostname
// 2) Go to https://[yoursite].desk.com/admin/settings/api-applications and create an API Application
// 3) Copy the consumer key & secret on the listing page after you create your API Application
// 4) Click the "Your Access Token" link to get your single access token & secret
// 5) Copy your single access token & secret and paste it into the appropriate variable in this file
//
@marcboquet
marcboquet / paymill_tokens.html
Created December 8, 2012 16:21
Generate paymill tokens
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<script type="text/javascript">
var PAYMILL_PUBLIC_KEY = 'your_public_paymill_key';
</script>
<script src="http://code.jquery.com/jquery-latest.min.js"></script>
<script type="text/javascript" src="https://bridge.paymill.com/"></script>
<script type="text/javascript">
$(document).ready(function () {
@akiatoji
akiatoji / _sns_description
Last active January 15, 2020 02:30
AWS SNS Sample code.
Notes on how to use AWS SNS:
1. Subscribe an HTTP endpoint (i.e. http://myhost/sns_endpoint) on AWS Console
2. AWS will send subscription confirmation right away
3. SNS_controller responds to subscription confirmation by sending confirmation using Fog.
4. Once AWS is happy, you can start sending notifications to your end point via SNS.
<apex:page >
<apex:includeScript value="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.2.min.js"/>
<script>
jQuery(document).ready(function($) {
$('#queryform').submit(function(){
$.ajax($('#query').val(),
{
beforeSend: function(xhr) {
xhr.setRequestHeader('Authorization', 'Bearer {!$Api.Session_ID}');
},
@aemxn
aemxn / index.php
Created July 5, 2015 00:29
crud-slim-tutorial
<?php
/**
* ROUTES:
* (Authorization header with api key is required for user session)
*
* /register
* method - post
* params - name, email, password
*
@julienbourdeau
julienbourdeau / prestashop.conf
Created May 4, 2016 14:23
PrestaShop Nginx Configuration
server {
listen 80;
listen [::]:80; #Use this to enable IPv6
server_name www.example.com;
root /var/www/prestashop17;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
index index.php index.html;
@peterjaap
peterjaap / magento_postman_collection.json
Created November 18, 2016 11:28
Postman request collection for Magento 1 SOAP v2
{
"id": "6b940a31-113d-109f-f36a-75c1604ef7d4",
"name": "ExampleShop",
"description": "",
"order": [
"2658e264-981e-4786-7f05-88f3fce0f4e6",
"8c81cf7c-e188-b8bd-0970-a96aa3a8d6a3",
"a1e3c72f-6fde-d46b-7896-e1627f7e5f64",
"c050284d-14bd-bdd6-256e-30111f354ef6",
"3b0ac9f0-3544-4797-fd4f-56b436ecd029",
@rgoytacaz
rgoytacaz / vtexCheckoutEvents.js
Last active July 25, 2019 19:48
Examples of events in VTEX Checkout
(function(){
$('#shipping-data').on('enable.vtex', function(){
console.log('Shipping Data just opened.');
});
$(window).on('orderFormUpdated.vtex', function(ev, orderForm) {
console.log('Order Form updated.');
});