sumnima sumnima sumnima sumnima sumnima sumnima sumnima
Categories
blog OS X

php5 for magento 2

sudo apt-get install php5-xsl

Sudo apt-get install php5-mcrypt

apt-get install php5-intl

service apache2 restart

Categories
blog digitalocean mysql

digitalocean upgrade mysql server 5.6

sudo apt-get purge mysql-server*

and after that, I did this:

sudo apt-get install mysql-server-5.6 

 

 

 

 

Start:

sudo /etc/init.d/mysql start

Stop:

sudo /etc/init.d/mysql stop

Restart / reload configs:

sudo /etc/init.d/mysql restart

Check run status:

sudo /etc/init.d/mysql status
Categories
blog ecommerce WooCommerce wordpress

woocommerce redirect to a custom page after logging out

// redirects for login / logout
add_filter(‘woocommerce_login_redirect’, ‘login_redirect’);

function login_redirect($redirect_to) {

return home_url();
}

add_action(‘wp_logout’,’logout_redirect’);

function logout_redirect(){

wp_redirect( home_url() );

exit();
}

Categories
.htaccess blog

.htaccess Deny IPs

Deny from 24.213.139.114
Deny from 87.144.218.222
Deny from 95.5.32.79
Deny from 213.251.186.27
Deny from 88.191.93.186
Deny from 91.121.136.44
Deny from 50.56.92.47
Deny from 174.143.148.105
Deny from 82.170.168.91
Deny from 24.213.139.114
Deny from 61.147.110.14
Deny from 188.134.42.65
Deny from 122.164.215.155
Deny from 65.49.68.173
Deny from 220.155.1.166
Deny from 218.38.16.26
Deny from 50.56.92.47
Deny from 24.213.139.114
Deny from 91.200.19.84
Deny from 31.44.199.131
Deny from 49.50.8.63
Deny from 171.221.126.73    – 8 days ago CN

Categories
blog css VIDEO youtube

How to create fluid width videos with CSS #BOOKMARK

http://www.creativebloq.com/html5/create-fluid-width-videos-8112993

<iframe> video (YouTube, Vimeo, etc)

Our little 100% width trick isn’t going to help us when dealing with video that is delivered via iframe. Setting a height is required, otherwise browsers will render the iframe at a static height of 150px, which is far too squat for most video and makes for more R&E (Ridiculous and Embarrassing). Literally all browsers will render iframe, canvas, embed, and object tags as 300px x 150px if not otherwise declared. Even if this isn’t present in the UA stylesheet.

The iframe above is missing its height attribute. While it's 100% width, its height is a static (and impractical) 150px
The iframe above is missing its height attribute. While it’s 100% width, its height is a static (and impractical) 150px

Fortunately there are a couple of possible solutions here. One of them was pioneered by Thierry Koblentz and presented on A List Apart in 2009: Creating Intrinsic Ratios for Video. With this technique, you wrap the video in another element which has an intrinsic aspect ratio, then absolute position the video within that. That gives us fluid width with a reasonable height we can count on.

    <div class=”videoWrapper”>
<!– Copy & Pasted from YouTube –>
<iframe width=”560″ height=”349″ src=”http://www.youtube.com/embed/n_dZNLr2cME?rel=0&hd=1″ frameborder=”0″ allowfullscreen></iframe>
</div>

    .videoWrapper {
position: relative;
padding-bottom: 56.25%; /* 16:9 */
padding-top: 25px;
height: 0;
}
.videoWrapper iframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}

9 box
Whatever YouTube iframe embed code you paste within the .videoWrapper, you’ll see it presented in a fluid 16:9 box
Categories
blog domains

Clear the Google Chrome DNS cache

Clear the @Google #Chrome #DNS cache chrome://net-internals/#dns – #BOOKMARK

Categories
blog ecommerce WooCommerce wordpress

WooCommerce: always showing add-to-cart button even before variation is selected

add_action( ‘woocommerce_before_add_to_cart_button’, function(){
// start output buffering
ob_start();
} );

add_action( ‘woocommerce_before_single_variation’, function(){
// end output buffering
ob_end_clean();
// output custom div
echo ‘

‘;
} );

http://stackoverflow.com/questions/29377643/woocommerce-always-showing-add-to-cart-button-even-before-variation-is-selected

Categories
blog ecommerce WooCommerce wordpress

woocommerce Change Related Product Text

gettext – The Most Useful Filter in WordPress http://speakinginbytes.com/2013/10/gettext-filter-wordpress/

/**
* Change text strings
*
* @link http://codex.wordpress.org/Plugin_API/Filter_Reference/gettext
*/
function my_text_strings( $translated_text, $text, $domain ) {
switch ( $translated_text ) {
case ‘Related Products’ :
$translated_text = __( ‘You may also like these’, ‘woocommerce’ );
break;
}
return $translated_text;
}
add_filter( ‘gettext’, ‘my_text_strings’, 20, 3 );

Categories
blog poem

Mero Chowk – Bhupi Sherchan

My Yard

In a narrow alley is my yard.
what isn?t here? everything is.
countless disease,
endless hunger,
boundless grief,
only bliss is absent,
there?s a ban on it.
in a narrow alley is my yard.
what isn?t here? everything is.
in this yard of mine
god-made men and
man-made gods
both live.
but both are dejected.
both are frustrated.
men are dejected
because they are
tortured by fleas all-night-long
tortured by monies all-day-long
and the gods are frustrated
because
no one worships them, no one respects them
so, in this yard
gods and men
blaming each other
curse their luck together
in a narrow alley is my yard.
what isn?t here? everything is.
By Bhupi Sherchan
Translated by Suman Subba

Categories
blog poem

नहुनुको अस्तितो

सायद नहुनुको अस्तितो यसरि नै
जन्मिन छ होला
आनी येस्तै बिरोदभाषहरु

आज मासंग
बचन को लागि, पुरा दिन भए पनि
भोलिको बचाई को लागि, कुर्दै छु
क्रमस
आज मासंग, आजको लागि बचनको समय छन्
बिहान सुर्यको किरंसन संगै बफिना
देउसो, साझ, आनी साझ पछि रात
कुनै मिठो
हिजोको सचि राखेको
भोलिको कुनै दिन,
तर आज, आज पनि तेस्तै निस्ते
भोलिको कुनै सुन्दा समयको लागि
पूर्ण एक, म खाली, सुन्य

Dated:  2 – 6 – 2059

Categories
blog song

तिम्रो मानमा

माया-२, मेरो पनि छ, तिम्रो मानमा
किन हो – २, एस्तो लागि रहेछ
भनि देउन, पोकी देउन -२
तिम्रो मुटुमा, लुकी रहेछ

– 2060