Jul 302011
 

Bye Bye Macports, Welcome Homebrew

Definition
Homebrew: The missing package manager for OS X

Why? well, the reality is, macports is not that good anymore.
Once you have many packages installed and start updating, everything start to break apart, lot’s of failing packages.

Homebrew is very easy to install, it’s fast and simple. That means you can make your own homebrew formula for your package so easily. oh, and homebrew is in ruby! :)

Back to topic, this is you how you get rails with mysql up and running with homebrew and rvm.

Clean up

To make sure to have a clean install, I recommend removing any previous .rvm installation and previous Xcode.

$ rm -rf ~/.rvm/
$ sudo rm -rf /Developer

1. Xcode

Install Xcode from AppStore. it’s 1+ GB download so it may take a while.
after it’s downloaded it will not install automatically, you need to open Applications and install again from there, the name will be “Install Xcode”.
You also need to install Command Line Tools for Xcode.

Better way is to go to https://developer.apple.com/downloads/index.action and download from there, you will have to login with a free apple developer account.
Download the 2 minimum require files

– Xcode 4.3.1 for Lion (1.85 GB)
– Command Line Tools for Xcode (171.70 MB)

Update: If you don’t want to download and install huge XCODE (3.0GB) :
https://github.com/kennethreitz/osx-gcc-installer
It allows you to install the essential compilers, GCC, LLVM, etc.
PS: I have not tested it
Thanks JP for the tip.

2. Install HomeBrew

UPDATE: in the comments some people recommended to do create the folder “/usr/local/Cellar” before hand, due to some bug on homebrew.

mkdir -p /usr/local/Cellar
$ /usr/bin/ruby -e "$(/usr/bin/curl -fsSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"

Installation instructions: https://github.com/mxcl/homebrew/wiki/installation

3. install RVM

$  bash -s master < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)

Above im using the master branch, so that it works with xcode 4.3.1

Then after RVM is installed run these two 'one-line' commands, the second command will reload your bash with RVM.

$ echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function' >> ~/.bash_profile
$ source ~/.bash_profile

Details instructions: click to read more

Note: you may have to add "--with-gcc=clang" to rvm for installing ruby 1.9.2 if you have Xcode 4.3+
Read this: http://crpcck.fr/index.php/case-study-template-education/

4. Install ruby 1.9.3-p125

OS X Lion comes with Ruby-1.8.7-p249, but we all want ruby 1.9.2/1.9.3 right?
RVM head and Ruby 1.9.3-p125 supports XCODE 4.3.1 http://www.lomadalodge.com/

$ rvm install 1.9.3-p125
$ rvm use ruby-1.9.3-p125
$ gem install rails bundler unicorn pg 
... and so on ...

I tested both ruby-1.9.3-head and ruby-1.9.3-p0, and 1.9.3-p125, and it works well with all my apps. Ruby 1.9.3 is faster than 1.9.2 booting rails, and way way faster than 1.8.7. So let's use the lastest Stable Ruby (1.9.3-p0)

See: can you buy zithromax at walmart.

NOTE: For Heroku I recommend you to use ruby-1.9.2-p290, if you use taps ("heroku db:pull/push")

Optionally you might want to install GIT, wget, http://mediamusique.com/, imagemagick and any other mighty software tools for daily use.

Example apps I'm usually required to install:

# brew install git ack wget curl redis memcached libmemcached colordiff imagemagick nginx sqlite libxml2 libxslt readline v8 rsync sphinx lzma geoip lzo 

5. Install Mysql

$ brew install mysql

one-line command:

$ mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp

Once mysql is installed you might want it to load automatically each time you start your mac.

$ mkdir -p ~/Library/LaunchAgents
$ cp /usr/local/Cellar/mysql/5.5.14/com.mysql.mysqld.plist ~/Library/LaunchAgents/
$ launchctl load -w ~/Library/LaunchAgents/com.mysql.mysqld.plist

*check that the version I use here is 5.5.14

6. Troubleshooting:

if you have problems with mysql "cannot connect to /tmp/mysql.sock"
then create a file /usr/local/etc/my.cnf and add this:

[client] 
port = 3306 
socket = /tmp/mysql.sock 
[mysqld] 
bind-address = 127.0.0.1
port = 3306 
socket = /tmp/mysql.sock 

if encounter errors with homebrew run this command and follow recommendations:

$ brew doctor

update: If you end up with Segmentation fault or cannot install Ruby-1.8.7, you might want to try this solution:

$ export CC=/usr/bin/gcc-4.2
$ rvm install ruby-1.8.7 

Important, also read this if you have Xcode 4.3.1+
http://stackoverflow.com/questions/9651670/issue-updating-ruby-on-mac-with-xcode-4-3-1

by the way this is my /usr/local/etc/my.cnf optimized file, when using this file you may have to recreate your db

$ mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp
[client] 
port = 3306 
socket = /tmp/mysql.sock 

[mysqld] 
event_scheduler = ON 
skip-character-set-client-handshake 
collation_server = utf8_unicode_ci 
character_set_server = utf8 

bind-address = 127.0.0.1
port = 3306 
socket = /tmp/mysql.sock 
max_connections = 20

table_open_cache = 256
max_allowed_packet = 32M 
binlog_cache_size = 1M 
max_heap_table_size = 64M 

read_buffer_size = 2M
read_rnd_buffer_size = 2M
sort_buffer_size = 4M
join_buffer_size = 512k
 
thread_cache_size = 2 
thread_concurrency = 2
query_cache_size = 16M 
query_cache_limit = 2M 

default-storage-engine = INNODB
thread_stack = 192K 
transaction_isolation = REPEATABLE-READ 
tmp_table_size = 64M 


# MyISAM Options 

key_buffer_size = 32M
bulk_insert_buffer_size = 32M
myisam_sort_buffer_size = 32M
myisam_max_sort_file_size = 256M
myisam_repair_threads = 1 
myisam_recover 

# INNODB Options
innodb_additional_mem_pool_size = 8M
innodb_buffer_pool_size = 64M
innodb_thread_concurrency = 2
innodb_flush_log_at_trx_commit = 2
innodb_log_buffer_size = 8M
innodb_log_file_size = 8M
innodb_log_files_in_group = 3
innodb_max_dirty_pages_pct = 90
innodb_flush_method = O_DIRECT
innodb_lock_wait_timeout = 120
innodb_file_per_table

[mysqldump] 
quick 
max_allowed_packet = 16M 

[mysql] 
no-auto-rehash 

[myisamchk] 
key_buffer_size = 64M
sort_buffer_size = 64M
read_buffer = 16M
write_buffer = 16M

[mysqlhotcopy] 
interactive-timeout 

UPDATED (Mar 14, 2012):
* Fixed homebrew install URL
* changed from "#" to "$" to avoid confusion of running commands as root

EDITED (Feb 10, 2012):
* updated for new RVM
* source .bash_profile after editing it.
* decreased memory settings for mysql
* using ruby-1.9.3-p0
* fixed minor bugs

 Posted by at 2:06 am
Jan 012011
 

WATCH NOW


Quality : HD
Title : Justice League vs. Teen Titans
Director : Sam Liu.
Writer : Alan Burnett,Bryan Q. Miller.
Release : 2016-03-29
Language : English.
Runtime : 78 min.
Genre : Action, Animation.

Synopsis :
\’Justice League vs. Teen Titans\’ is a movie genre Action, was released in March 29, 2016. Sam Liu was directed this movie and starring by Jon Bernthal. This movie tell story about Robin is sent by Batman to work with the Teen Titans after his volatile behavior botches up a Justice League mission. The Titans must then step up to face Trigon after he possesses the League and threatens to conquer the world.

WATCH NOW

 Posted by at 4:18 pm

Encrypted image that grows as needed, for linux backups

 osx  Comments Off on Encrypted image that grows as needed, for linux backups
Jul 242010
 

This command will create an encrypted image on mac OS X that will grow as you need it.
Since I could not find anywhere on the net, I dig on the hdiutil man page and wrapped the command. Ондатра

The image starts with about 600MB in size, which is not wasted actually.

I use this image to backup my sensitive data such as servers config files, mysql databases and repositories.
I set it to use AES 128bit encryption.
Case-sensitive, because Linux fs are Case-sensitive by default. If you don’t set it Case-sensitive you cannot use for linux backups.

hdiutil create -encryption AES-128 -stdinpass -fs “Case-sensitive HFS+” -type SPARSE -nospotlight -volname Servers Servers

it will create a file named Servers.sparseimage

 Posted by at 3:47 pm
Jun 142009
 

WATCH NOW


Quality : HD
Title : Fifty Shades Darker
Director : James Foley.
Writer :
Release : 2017-02-08
Language : English.
Runtime : 118 min.
Genre : Drama, Romance.

Synopsis :
Movie Fifty Shades Darker was released in February 8, 2017 in genre Drama. James Foley was directed this movie and starring by Dakota Johnson. This movie tell story about When a wounded Christian Grey tries to entice a cautious Ana Steele back into his life, she demands a new arrangement before she will give him another chance. As the two begin to build trust and find stability, shadowy figures from Christian’s past start to circle the couple, determined to destroy their hopes for a future together.

WATCH NOW

Watch Full Movie HD-1080p The Nice Guys (2016) English Subtitle

 nginx, osx  Comments Off on Watch Full Movie HD-1080p The Nice Guys (2016) English Subtitle
Jun 142009
 

The Nice Guys (2016) Full Movie Online Watch Free , English Subtitles Full HD, Free Movies Streaming , Free Latest Films.


Quality : HD
Title : The Nice Guys.
Director : Shane Black
Release : May 15, 2016
Language : en.
Runtime : 116 min
Genre : Action, Comedy, Crime, Mystery, Thriller.

Synopsis :
‘The Nice Guys’ is a movie genre Action, Comedy, Crime, Mystery, Thriller, was released in May 15, 2016. Shane Black was directed this movie and starring by Russell Crowe. This movie tell story about A private eye investigates the apparent suicide of a fading porn star in 1970s Los Angeles and uncovers a conspiracy.

Watch Full Movie The Nice Guys (2016)

We serve you with the best possible view of the facilities and procedures to follow step by step so that you (the visitor) will feel like a king. Download The Nice Guys, take a little time now to register for free and you can benefit later.

In addition, the movie The Nice Guys security issues and antivirus technology, you no longer have to worry about any set of data transfer security disturb your precious PC or laptop. Also, with a different file formats such as DVD, CD, iPod, HDD and Divx, now you can really forget about replusive video format that can not be played! So guys, now it’s time for you to sit back, relax, drinking a can of cola (cold drink) or some snacks to watch The Nice Guys online just take 116 min, and you will feel you like in the cinema room. just by sitting in front of your computer and sign in to our site to watch The Nice Guys online and you could see your favorite movie the other.

Incoming search term :

Watch The Nice Guys Online Independent
Watch Stream Online The Nice Guys
The Nice Guys Watch Online
Watch The Nice Guys Online Megashare
The Nice Guys English Episodes Free Watch Online
Watch The Nice Guys Online UltraHD
Watch The Nice Guys Online Hitfix
Watch The Nice Guys Online Latinpost
The Nice Guys English Full Episodes Online Free Download
The Nice Guys HD English Full Episodes Download
Watch The Nice Guys Online Mediafire
The Nice Guys Watch Online
Watch The Nice Guys Online VodlockerHd
The Nice Guys Free Online
Watch The Nice Guys Online Viooz
The Nice Guys English Full Episodes Watch Online
The Nice Guys For Free online
The Nice Guys Episodes Online
Watch The Nice Guys Online Cinemablend
Watch The Nice Guys Online Indiewire
The Nice Guys Online Free Megashare
The Nice Guys Episodes Watch Online
The Nice Guys Full Episodes Online
The Nice Guys Full Episode
Watch The Nice Guys Online Collider
Watch The Nice Guys Online Allmyvideos
Watch The Nice Guys Online Instanmovie
The Nice Guys Free Download
The Nice Guys Full Episodes Watch Online
Watch The Nice Guys Online Free

Switch to our mobile site