This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const SENDGRID_API_KEY = 'INSERT API KEY HERE' | |
const MY_TEMPLATE_ID = 'INSERT TEMPLATE ID HERE' | |
var sendgrid = require('sendgrid')(process.env.SENDGRID_API_KEY) | |
// Note the html parameter - you must have this set or you'll get an error about having no | |
// body set | |
var email = new sendgrid.Email({ | |
from: '[email protected]', | |
to: '[email protected]', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Builds and pushed docker image of a git repo, tagging the git repo and docker image with the | |
# same tag. Make sure you are logged into docker and that boot2docker is running if you're on | |
# OSX or Windows | |
# Check that a version tag was given | |
if [ $# -eq 0 ] | |
then | |
echo "No version tag supplied, please enter a version tag as the first parameter of this script" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
docker stop $(docker ps -a -q) # Stop and close any running docker containers | |
docker rm $(docker ps -a -q) | |
docker build -t myapp . # Build and run the container | |
docker run --name mydockerapp -d -p 80:80 myapp | |
docker exec -it mydockerapp bash # Open a bash terminal on the running container |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdbool.h> | |
#define STARTING_NUMBER 1 | |
#define ENDING_NUMBER 100 | |
enum CASES { MULTIPLE_OF_THREE = 1, MULTIPLE_OF_FIVE, MULTIPLE_OF_BOTH }; | |
/** | |
* Tests if 'number' is a multiple of 'multiple', returns TRUE or FALSE accoringly |