Skip to content

Instantly share code, notes, and snippets.

View syamsathyan's full-sized avatar

Syam Sathyan George syamsathyan

View GitHub Profile
@syamsathyan
syamsathyan / gist:c4fa0fb14dfbdd8f50bcc87659495c7e
Created June 21, 2016 03:56 — forked from brandonmwest/gist:4512396
curl + PHP example of using the SendGrid web api

This example uses cURL with PHP through our web API to send an email.

<?php $url = 'http://sendgrid.com/';
$user = 'USERNAME';
$pass = 'PASSWORD'; 
 
$params = array(
    'api_user'  => $user,
 'api_key' =&gt; $pass,
public class RedisClient {
private JedisPool pool;
@Inject
public RedisClient(Settings settings) {
try {
pool = new JedisPool(new JedisPoolConfig(), settings.get("redis.host"), settings.getAsInt("redis.port", 6379));
} catch (SettingsException e) {
// ignore