This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Myapp::Application.config.session_store :cookie_store, key: '_myapp_session',:domain => :all | |
to | |
Myapp::Application.config.session_store :cookie_store, key: '_myapp_session' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://help.ubuntu.com/community/CronHowto | |
00 00 * * * ruby path/to/your/script.rb | |
Syntax: | |
mm hh dd mt wd command | |
mm minute 0-59 | |
hh hour 0-23 | |
dd day of month 1-31 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://k-tuning.com/genesisc?bfilter=f3:18; | |
http://tuningleader.ru/category/genesis-coupe-/ | |
http://k-tuning.com/genesisc/reshetka-radiatora-hyundai-genesis-coupe-roadruns.html | |
http://tuningleader.ru/product/reshetka-radiatora-roadruns_1y/ | |
http://k-tuning.com/genesisc/reshetka-radiatora-type-d-hyundai-genesis-coupe-m-and-s.html | |
http://www.aliexpress.com/price/genesis-coupe-grill_price.html | |
http://www.aliexpress.com/popular/genesis-front-grill.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://zetcode.com/databases/mysqltutorial/exportimport/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To expose MySQL to anything other than localhost you will have to have the following line uncommented in /etc/mysql/my.cnf and assigned to your computers IP address and not loopback | |
#Replace xxx with your IP Address | |
bind-address = xxx.xxx.xxx.xxx | |
Or add a bind-address = 0.0.0.0 if you don't want to specify the IP | |
Then stop and restart MySQL with the new my.cnf entry. Once running go to the terminal and enter the following command. | |
lsof -i -P | grep :3306 | |
That should come back something like this with your actual IP in the xxx's |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
First make a backup of your /var/lib/mysql/ directory just to be safe. | |
sudo mkdir /home/<your username>/mysql/ | |
cd /var/lib/mysql/ | |
sudo cp * /home/<your username>/mysql/ -R | |
Next purge MySQL (this will remove php5-mysql and phpmyadmin as well as a number of other libraries so be prepared to re-install some items after this. | |
sudo apt-get purge mysql-server-5.1 mysql-common | |
Remove the folder /etc/mysql/ and it's contents |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1 Remove old chef | |
``` | |
sudo rm -rf chef-solo/ | |
sudo rm -rf /opt/chef | |
sudo apt-get remove chef | |
sudo apt-get remove chef-server-core | |
``` | |
# 2 Install new chef | |
bundle exec knife solo prepare <IP ADDRESS> -x root --bootstrap-version=12 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ curl -v -H "X-Auth-User: <your_rackspace_username>" -H "X-Auth-Key: <your_rackspace_api_key>" https://auth.api.rackspacecloud.com/v1.0 | |
* About to connect() to auth.api.rackspacecloud.com port 443 (#0) | |
* Trying 67.192.1.11... connected | |
* Connected to auth.api.rackspacecloud.com (67.192.1.11) port 443 (#0) | |
* SSLv3, TLS handshake, Client hello (1): | |
* SSLv3, TLS handshake, Server hello (2): | |
* SSLv3, TLS handshake, CERT (11): | |
* SSLv3, TLS handshake, Server finished (14): | |
* SSLv3, TLS handshake, Client key exchange (16): | |
* SSLv3, TLS change cipher, Client hello (1): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scope :with_specialties, -> (specialty_ids) { | |
joins(:specialties). | |
where("specialties.id IN (?)", specialty_ids). | |
group("users.id") | |
} | |
scope :for_specialty_id, -> (specialty_id) { | |
user_ids = UserAndSpecialty.for_specialty_id(specialty_id).select(:user_id) | |
where id: user_ids | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
One more thing, it would be great to follow convention for scopes naming: | |
# filter scopes | |
scope for_gender, ... | |
# order scopes | |
scope by_gender, ... |