container_commands: | |
tagVolume: | |
command: aws ec2 create-tags --resources $(aws ec2 describe-instances --region $(curl http://169.254.169.254/latest/meta-data/placement/availability-zone| sed 's/[a-z]$//') --instance-id $(curl http://169.254.169.254/latest/meta-data/instance-id ) --output text --query Reservations[0].Instances[0].BlockDeviceMappings[0].Ebs.VolumeId) --region $(curl http://169.254.169.254/latest/meta-data/placement/availability-zone| sed 's/[a-z]$//') --tags Key=Name,Value=$(/opt/elasticbeanstalk/bin/get-config container -k environment_name) |
web: ./start_server.sh # would like to use environment variables here, but it is not supported |
#include <Python.h> | |
/* | |
* Usage | |
$ python | |
Python 2.7.3 |Anaconda 1.4.0 (64-bit)| (default, Feb 25 2013, 18:46:31) | |
[GCC 4.1.2 20080704 (Red Hat 4.1.2-52)] on linux2 | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> import evil |
// What works | |
var original = new Date(); | |
var copy = new Date(original); | |
// What doesn't work | |
copy = original; // It should work, but it passes by reference so changes to copy also affect original | |
copy = jQuery.extend(true, {}, original); // Passes a useless object |
import argparse | |
from mock import Mock | |
m = Mock() | |
parser = argparse.ArgumentParser() | |
subparsers = parser.add_subparsers() | |
query_group = subparsers.add_parser('query') | |
add_group = subparsers.add_parser('add') |
Article by Faruk Ateş, [originally on KuraFire.net][original] which is currently down
One of the most commonly overlooked and under-refined elements of a website is its pagination controls. In many cases, these are treated as an afterthought. I rarely come across a website that has decent pagination, and it always makes me wonder why so few manage to get it right. After all, I'd say that pagination is pretty easy to get right. Alas, that doesn't seem the case, so after encouragement from Chris Messina on Flickr I decided to write my Pagination 101, hopefully it'll give you some clues as to what makes good pagination.
Before going into analyzing good and bad pagination, I want to explain just what I consider to be pagination: Pagination is any kind of control system that lets the user browse through pages of search results, archives, or any other kind of continued content. Search results are the o