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' => $pass,| echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
| . ~/.bashrc | |
| mkdir ~/local | |
| mkdir ~/node-latest-install | |
| cd ~/node-latest-install | |
| curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
| ./configure --prefix=$HOME/local | |
| make install |
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' => $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 |
| from fabric.api import cd, env, run | |
| def BF(): | |
| env.hosts = [''] | |
| def GBL(): | |
| env.hosts = [''] | |
| def free(): | |
| run('free -h') |
| public static class BaseKeyGenerator | |
| { | |
| public static void TestBaseKeyGenerator() | |
| { | |
| // create five IDs of six, base 62 characters | |
| for (int i=0; i<5; i++) Console.WriteLine(BaseKeyGenerator.GetBase62(6)); | |
| // create five IDs of eight base 36 characters | |
| for (int i=0; i<5; i++) Console.WriteLine(BaseKeyGenerator.GetBase36(8)); |
| redisServer.start(); | |
| //Start Jedis ConnFactory | |
| JedisShardInfo shardInfo = new JedisShardInfo("localhost", 6379); | |
| connectionFactory = new JedisConnectionFactory(); | |
| connectionFactory.setShardInfo(shardInfo); | |
| //Init RedisTemplate | |
| template = new StringRedisTemplate(); | |
| template.setConnectionFactory(connectionFactory); | |
| template.afterPropertiesSet(); |