Rails flash messages with AJAX requests & twitter-bootstrap 2.3
Forked from https://gist.github.com/linjunpop/3410235 Based on Stackoverflow answer: http://stackoverflow.com/a/10167659/656428
License: MIT
ls -l | grep ^d | awk '{print $NF}' | xargs -n 1 bash -c 'cd $0; git pull' |
<%= f.input :handling_fee, label:"Flat Surcharge" , as: :string, | |
input_html: { value: number_to_currency(f.object.handling_fee, locale: :fr) } %> | |
In order for this to work I needed to add the gem rails-i18n |
In Controller Setup: | |
@currency_symbol = Money::Currency.new(<model currency code>).symbol | |
In layout html: | |
<div id="currency_symbol" style="display:none"><%= @currency_symbol %></div> | |
In JS: |
pkill -f my_pattern | |
e.g | |
pkill -f test.php |
String text = new Scanner( new File("poem.txt") ).useDelimiter("\\A").next(); |
So we all hate reading docs. Here is the quick setup for installing Magento2. If you want the long route - http://devdocs.magento.com/ | |
I'm assuming you have composer, PHP 5.4+ and MySQL5.6+. If you have MAMP installed time to go sort that as it wont work (MAMP is on MySQL5.5.x). | |
1. Install Composer - curl -sS https://getcomposer.org/installer | php | |
2. mv composer.phar /usr/local/bin/composer (might need to sudo) | |
3. Goto base httpdocs directory | |
4. git clone [email protected]:magento/magento2.git | |
5. Set permissions (like you do in Magento 1.x) | |
6. cd magento2 |
Ignoring frontend logic the important directories I can see so far are: | |
- app/code/Magento - Holds Magento implementation modules, e.g Customer, Cart, Checkout | |
- internal/Magento/Framework - Magento Framework e.g. Session Handling, SQL Setup, Cache | |
- pub/errors - Can move the local.xml.sample to local.xml so you don't have to keep looking in report directory!! | |
- vendor - 3rd Party libraries loaded via composer | |
- app/<module_vendor> - 3rd Party magento extensions | |
- app/etc/env.php - db credentials, replaces local.xml? | |
- var/cache, var/generation & var/page_cache - Delete these 3 directories to fully flush cache |
Firstly you need to ensure you have enough memory allocated else the script will fall over. | |
Edit php.ini and I found that setting memory_limit to 1028M was enough (default is 128M). | |
If you want to find your php.ini then you can look at phpinfo.php, or do: | |
php -i | grep php.ini | |
To run the tests goto base root folder and type: |
Rails flash messages with AJAX requests & twitter-bootstrap 2.3
Forked from https://gist.github.com/linjunpop/3410235 Based on Stackoverflow answer: http://stackoverflow.com/a/10167659/656428
License: MIT
Step 1: Open a Terminal window | |
Step 2: cd /Applications/Skype.app/Contents/MacOS/ | |
Step 3: sudo ./Skype |