Skip to content

Instantly share code, notes, and snippets.

Gently seasoned with a touch of chile powder, cinnamon and vanilla, this fragrant hot chocolate recipe is not too sweet and very complex. Using both cocoa powder and chocolate gives the roundest, deepest chocolate flavor while a mix of whole milk and cream makes it wonderfully rich and thick.
TOTAL TIME10 minutes plus 1 hour steeping
FACEBOOK
TWITTER
GOOGLE+
SAVE
EMAIL
SHARE
PRINT
REPRINTS
@CrookedNumber
CrookedNumber / gist:8978018
Last active August 29, 2015 13:56
RESTful

The short answer is that no one talks about RESTful websites because websites are RESTful by default. You really have to try to make a non-RESTful website (though it has been done--see below).

The setup you're describing takes a lot of elements from REST, but it's not "REST" per se: it's a set of conventions designed for the convenience of server-side programmers. Most of today's web APIs only use a subset of the REST constraints, and it's a subset that doesn't include the main driving principle behind websites.

Let me back up a bit. Here's what websites and web APIs have in common: they both expose functionality through resources. Each resource is identified by a URL, and each responds to an appropriate subset of the standard HTTP methods. (This may seem obvious, but look at XML-RPC or SOAP, where there's only one URL for the whole system.) A resource might send documents to the client (in response to a GET request) and/or it might accept documents from the client (along with a POST or PUT request).

Now,

@CrookedNumber
CrookedNumber / gist:9254367
Created February 27, 2014 17:03
Rename existing branch
git branch -m <newname>
@CrookedNumber
CrookedNumber / gist:c5a6f08c34ac1740d8b9
Created October 20, 2014 15:05
Brussels Sprout Salad with Cheddar, Hazelnuts, and Apple
SERVES 8
Slice the sprouts as thin as possible. Shred the cheddar on the large holes of a box grater.
INGREDIENTS
3 tablespoons lemon juice
2 tablespoons Dijon mustard
1 small shallot, minced
1 garlic clove, minced
(Makes 10-12 crepes, depending on the size of your pan)
1 c. flour (all-purpose or whole wheat)
Pinch of salt
1 1/4 c. milk
2 eggs
2 Tbsp. butter, melted and cooled
@CrookedNumber
CrookedNumber / gist:8ee6591b64141e9893a7
Last active August 29, 2015 14:27
Make a local branch a tracking branch
git branch -u upstream/foo
// e.g., git branch -u origin/master
@CrookedNumber
CrookedNumber / drupal-bulk-validate.py
Created December 17, 2009 22:08
Python script to bulk validate a drupal site
#!/usr/bin/env python
import urllib
import time
import httplib
base = 'www.edc.org' # NO trailing slash
lim = 200 # highest nid in your {node} table
def xhmtl_is_valid(url):
time.sleep(.75) # seconds
3 eggs
½ vanilla bean, split, or 1/2 teaspoon vanilla extract
⅓ cup sugar, preferably organic fair-trade sugar
Pinch of salt
⅔ cup sifted unbleached all-purpose flour
½ cup plain yogurt
¾ cup low-fat milk
35-40 @375
Index: system.install
===================================================================
--- modules/system/system.install (revision 8648)
+++ modules/system/system.install (working copy)
@@ -476,15 +476,6 @@
}
$requirements['update status']['title'] = $t('Update notifications');
- // Check that Drupal can issue HTTP requests.
- if (variable_get('drupal_http_request_fails', TRUE) && !system_check_http_request()) {
477,486d476
<
< // Check that Drupal can issue HTTP requests.
< if (variable_get('drupal_http_request_fails', TRUE) && !system_check_http_request()) {
< $requirements['http requests'] = array(
< 'title' => $t('HTTP request status'),
< 'value' => $t('Fails'),
< 'severity' => REQUIREMENT_ERROR,
< 'description' => $t('Your system or network configuration does not allow Drupal to access web pages, resulting in reduced functionality. This could be due to your webserver configuration or PHP settings, and should be resolved in order to download information about available updates, fetch aggregator feeds, sign in via OpenID, or use other network-dependent services. If you are certain that Drupal can access web pages but you are still seeing this message, you may add <code>$conf[\'drupal_http_request_fails\'] = FALSE;</code> to the bottom of your settings.php file.'),
< );