To setup your computer to work with *.dev domains, e.g. project.dev, awesome.dev and so on, without having to add to your hosts file each time.
- Homebrew
- Mountain Lion
| # Check the name of the volume | |
| fdisk -l | |
| # Should look like this: | |
| # Disk /dev/xvde: 214.7 GB, 214748364800 bytes | |
| # Resize the volume | |
| resize2fs /dev/xvde |
| #!/usr/bin/ruby | |
| module Tty extend self | |
| def blue; bold 34; end | |
| def white; bold 39; end | |
| def red; underline 31; end | |
| def reset; escape 0; end | |
| def bold n; escape "1;#{n}" end | |
| def underline n; escape "4;#{n}" end | |
| def escape n; "\033[#{n}m" if STDOUT.tty? end |
| source 'https://rubygems.org' | |
| gem 'rails', '3.2.1' | |
| # Bundle edge Rails instead: | |
| # gem 'rails', :git => 'git://github.com/rails/rails.git' | |
| gem 'sqlite3' |
| s3cmd ls --recursive s3://BUCKET_NAME | ruby -rdate -ne 'date, time, size, uri = $_.split; puts uri if size == "0"' | xargs s3cmd del |
To setup your computer to work with *.dev domains, e.g. project.dev, awesome.dev and so on, without having to add to your hosts file each time.
| # Command to replace php memory limit in php.ini with env var | |
| sed -i "s|;*memory_limit =.*|memory_limit = ${PHP_MEMORY_LIMIT}|i" /etc/php5/php.ini |
| --- ext/openssl/ossl_pkey_ec.c | |
| +++ ext/openssl/ossl_pkey_ec.c | |
| @@ -757,8 +757,10 @@ static VALUE ossl_ec_group_initialize(int argc, VALUE *argv, VALUE self) | |
| method = EC_GFp_mont_method(); | |
| } else if (id == s_GFp_nist) { | |
| method = EC_GFp_nist_method(); | |
| +#if !defined(OPENSSl_NO_EC2M) | |
| } else if (id == s_GF2m_simple) { | |
| method = EC_GF2m_simple_method(); | |
| +#endif |
| require 'formula' | |
| class Elasticsearch < Formula | |
| homepage 'http://www.elasticsearch.org' | |
| url 'https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.0.2.tar.gz' | |
| sha256 '2fc2cd05e5f301ba972c9bf90232b70592568990f526f2634b3a768c4615ad70' | |
| head do | |
| url 'https://github.com/elasticsearch/elasticsearch.git' | |
| depends_on 'maven' |
| #!/bin/bash | |
| set -e | |
| function getHostname() | |
| { | |
| local HOST='' | |
| while test -z "$HOST" | |
| do | |
| read -p "$1 : " HOST |
| # First create a dump of your MySQL database | |
| mysqldump -u [user] -p database_name > database_name.sql | |
| # Convert the data | |
| iconv -f iso-8859-15 -t utf8 database_name.sql > database_name_iconv.sql | |
| # Import the database | |
| mysql -u [user] -p database_name < database_name_iconv.sql | |
| # If you still have some specific characters that do not display |