Skip to content

Instantly share code, notes, and snippets.

View jlove4m's full-sized avatar

Josh Love jlove4m

View GitHub Profile
@jlove4m
jlove4m / core nginx config
Created July 31, 2016 14:06
Basic nginx config for rails app
#/etc/nginx/nginx.conf - linux (debian/ubuntu)
#/usr/local/etc/nginx/nginx.conf
user www-data;
worker_processes 1;
events {
worker_connections 1024;
}
@jlove4m
jlove4m / demo.php
Last active July 31, 2016 14:07
Helping Mike G's student
<?
require_once './unirest/src/Unirest.php';
// These code snippets use an open-source library. http://unirest.io/php
$response = Unirest\Request::get("https://spoonacular-recipe-food-nutrition-v1.p.mashape.com/recipes/findByIngredients?ingredients=apples%2Cflour%2Csugar&limitLicense=false&number=5&ranking=1",
array("X-Mashape-Key" => "<your key>","Accept" => "application/json"));
echo $response->raw_body;
?>