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
## with Bootstrap_form_for for lazy peeps | |
= bootstrap_form_for [:admin, @reservation] do |f| | |
- if @reservation.errors.any? | |
#error_explanation | |
%h2= "#{pluralize(@reservation.errors.count, "error")} prohibited this reservation from being saved:" | |
%ul | |
- @reservation.errors.full_messages.each do |message| | |
%li= message | |
.col-md-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
#!/bin/bash -e | |
clear | |
echo "============================================" | |
echo "WordPress Install Script" | |
echo "============================================" | |
echo "Do you need to setup new MySQL database? (y/n)" | |
read -e setupmysql | |
if [ "$setupmysql" == y ] ; then | |
echo "MySQL Admin User: " | |
read -e mysqluser |
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
Prefilter by Product Brands: | |
This is the hierarchy of the search | |
=Adidas (brand) | |
==Adidas Original (subbrand) | |
===Air (subsubbrand) | |
===Casual | |
==Adidas Performance | |
===Running |
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
Templates work as follows in Woocommerce | |
> Create a php file name it template-calculator | |
Add the following PHP code, and go to pages, create page, name it calculator. Choose on the right the template (calculator). | |
All the code written in the template can be used. | |
<?php | |
/** |
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://www.sitepoint.com/woocommerce-actions-and-filters-manipulate-cart/ | |
https://docs.woothemes.com/wc-apidocs/class-WC_Cart.html | |
https://docs.woothemes.com/wc-apidocs/package-WooCommerce.Functions.Cart.html | |
https://gist.github.com/renegadesk/3967956 |
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
#!/bin/bash -e | |
clear | |
echo "============================================" | |
echo "WordPress Install Script" | |
echo "============================================" | |
echo "Database Name: " | |
read -e dbname | |
echo "Database User: " | |
read -e dbuser | |
echo "Database Password: " |
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
CREATE DATABASE woocommerce; | |
CREATE USER admin@localhost; | |
SET PASSWORD FOR admin@localhost= PASSWORD("admin"); | |
GRANT ALL PRIVILEGES ON woocommerce.* TO admin@localhost IDENTIFIED BY 'admin'; | |
FLUSH PRIVILEGES; | |
http://stackoverflow.com/questions/11951570/mysql-create-user-with-a-variable |
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
ssh-keygen | |
adduser username | |
visudo | |
deluser newuser | |
cat ~/.ssh/id_rsa.pub |
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
Make a woocommerce shop less Woocommerce'ish | |
https://wordpress.org/plugins/woocommerce-admin-theme-for-shop-manager/ | |
https://wordpress.org/plugins/wp-flatadmin/ | |
https://wordpress.org/plugins/slate-admin-theme/ |
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
#!/bin/bash | |
# ================================================================== # | |
# Ubuntu 14.04 web server build shell script | |
# ================================================================== # | |
# | |
# ================================================================== # | |
# | |
# | |
# | |
# ================================================================== # |