Version: 1.9.8
Platform: x86_64
First, install or update to the latest system software.
sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev
literally always have to look up the meaning of :limit in migrations when it comes to integer values. Here's an overview. Now let's memorise it (oh, this works for MySQL, other databases may work differently): | |
:limit Numeric Type Column Size Max value | |
1 tinyint 1 byte 127 | |
2 smallint 2 bytes 32767 | |
3 mediumint 3 byte 8388607 | |
nil, 4, 11 int(11) 4 byte 2147483647 | |
5..8 bigint 8 byte 9223372036854775807 | |
Note: by default MySQL uses signed integers and Rails has no way (that I know of) to change this behaviour. Subsequently, the max. values noted are for signed integers. |
module ElasticSearchHelpers | |
# sanitize a search query for Lucene. Useful if the original | |
# query raises an exception, due to bad adherence to DSL. | |
# Taken from here: | |
# | |
# http://stackoverflow.com/questions/16205341/symbols-in-query-string-for-elasticsearch | |
# | |
def self.sanitize_string(str) | |
# Escape special characters | |
# http://lucene.apache.org/core/old_versioned_docs/versions/2_9_1/queryparsersyntax.html#Escaping Special Characters |
# Install Git needed for Git based gems | |
packages: | |
yum: | |
git: [] | |
files: | |
# Make the appropriate directories | |
"/opt/elasticbeanstalk/hooks/appdeploy/pre/020_bootstrap.sh": | |
mode: "000755" | |
owner: root | |
group: root | |
content: | | |
#!/usr/bin/env bash | |
# /opt/elasticbeanstalk/hooks/appdeploy/pre/01a_bootstrap.sh |
from random import choice | |
from scrapy import signals | |
from scrapy.exceptions import NotConfigured | |
class RotateUserAgentMiddleware(object): | |
"""Rotate user-agent for each request.""" | |
def __init__(self, user_agents): | |
self.enabled = False | |
self.user_agents = user_agents |
# install dependencies | |
sudo apt-get update | |
sudo apt-get install -y build-essential | |
sudo apt-get install -y cmake | |
sudo apt-get install -y libgtk2.0-dev | |
sudo apt-get install -y pkg-config | |
sudo apt-get install -y python-numpy python-dev | |
sudo apt-get install -y libavcodec-dev libavformat-dev libswscale-dev | |
sudo apt-get install -y libjpeg-dev libpng-dev libtiff-dev libjasper-dev | |
Inspired by dannyfritz/commit-message-emoji
See also gitmoji.
Commit type | Emoji |
---|---|
Initial commit | 🎉 :tada: |
Version tag | 🔖 :bookmark: |
New feature | ✨ :sparkles: |
Bugfix | 🐛 :bug: |