Skip to content

Instantly share code, notes, and snippets.

View jdennes's full-sized avatar

James Dennes jdennes

View GitHub Profile
@jdennes
jdennes / link-header.sh
Last active December 26, 2015 20:58
Demonstrate repository url by ID included in the pagination details in the Link header.
@jdennes
jdennes / request.sh
Last active December 31, 2019 09:30
Most starred public repositories on GitHub.
curl -G https://api.github.com/search/repositories \
--data-urlencode "q=stars:>1000" \
--data-urlencode "sort=stars" \
--data-urlencode "order=desc" \
-H "Accept: application/vnd.github.preview"
@jdennes
jdennes / CreateSendOAuthTest.java
Last active December 14, 2015 00:09
A Java application to demonstrate authenticating with the Campaign Monitor API using OAuth. Uses the createsend-java library as well as the Spark micro web framework (but could easily be adapted for use with any Java web application framework).
// Ensure you set the CREATESEND_CLIENT_ID, CREATESEND_CLIENT_SECRET,
// and CREATESEND_REDIRECT_URI environment variables for your registered
// OAuth application.
import static spark.Spark.*;
import spark.*;
import com.createsend.General;
import com.createsend.models.clients.ClientBasics;
import com.createsend.models.OAuthTokenDetails;
import com.createsend.util.AuthenticationDetails;
@jdennes
jdennes / createsend-oauth.php
Last active December 13, 2015 20:58
A PHP application to demonstrate authenticating with the Campaign Monitor API using OAuth. Uses the createsend-php library as well as the Slim PHP micro framework (but could easily be adapted for use with any PHP framework).
<?php
# 1. Ensure you have Slim installed and in your include path.
# 2. Ensure you have createsend-php installed and in your include path.
# 3. Set CREATESEND_CLIENT_ID, CREATESEND_CLIENT_SECRET,
# and CREATESEND_REDIRECT_URI environment variables for
# your registered OAuth application.
require 'createsend/csrest_general.php';
require 'Slim/Slim.php';
\Slim\Slim::registerAutoloader();
@jdennes
jdennes / Gemfile
Last active October 14, 2021 05:17
Another example Rack application to demonstrate authenticating with the Campaign Monitor API using OAuth. This example only uses the sinatra and createsend gems.
source :rubygems
gem 'sinatra'
gem 'createsend'
@jdennes
jdennes / Procfile
Last active December 12, 2015 10:48
Another example Flask application to demonstrate authenticating with the Campaign Monitor API using OAuth. This example only uses the createsend and Flask packages.
web: python app.py
@jdennes
jdennes / Procfile
Last active December 31, 2021 09:24
Flask application to demonstrate authenticating with the Campaign Monitor API using OAuth. Uses the createsend, Flask, and Flask-OAuth packages.
web: python app.py
@jdennes
jdennes / Gemfile
Last active December 12, 2015 06:38
Rack application to demonstrate authenticating with the Campaign Monitor API using OAuth. Uses the sinatra, omniauth-createsend, and createsend gems.
source :rubygems
gem 'sinatra'
gem 'omniauth-createsend'
gem 'createsend'
@jdennes
jdennes / HISTORY.md
Created October 24, 2012 15:09
Generates a HISTORY.md file for your repo based on tags and commits

createsend-ruby history

v2.3.0 - 10 Oct, 2012 (6639c1f6)

  • Added support for creating campaigns from templates.
  • Updated shoulda dependency.
  • Added support for unsuppressing an email address.
  • Adding custom field data to expected output from getting active subscribers. This clearly documents the data structure to be expected for multi option multi select fields.
  • Removed Alt field from Singleline elements in test (singleline tags don't support alt text).
  • Version 2.3.0
@jdennes
jdennes / cm-basic-subscribe.html
Created August 7, 2012 14:47
The most basic Campaign Monitor subscribe form
<!-- The most basic Campaign Monitor subscribe form -->
<form action="http://jamesd.createsend.com/t/r/s/hujtkt/" method="post" id="subForm">
<label for="hujtkt-hujtkt">Email:</label><br />
<input type="text" name="cm-hujtkt-hujtkt" id="hujtkt-hujtkt" /><br />
<input type="submit" value="Subscribe" />
</form>