Skip to content

Instantly share code, notes, and snippets.

View qutek's full-sized avatar
💻
Working from home

Lafif Astahdziq qutek

💻
Working from home
View GitHub Profile
@qutek
qutek / install-copy-sync-ubuntu
Created May 13, 2014 11:01
Install Copy Sync Ubuntu
wget https://copy.com/install/linux/Copy.tgz
tar -xvzf Copy.tgz
# optional clean-up
rm Copy.tgz
# If your Ubuntu is Ubuntu 64bits:
cd copy/x86_64
# If your Ubuntu is Ubuntu 32bits:
@qutek
qutek / LimitChar.php
Last active August 29, 2015 14:00
Limit Character Wordpress Archive
<?php
/********************
Limit karakter untuk archive
*********************/
function content($limit, $more='Read More') {
$content = explode(' ', get_the_content(), $limit);
if (count($content)>=$limit) {
array_pop($content);
$content = implode(" ",$content).' <a href="'.get_permalink().'">'.$more.'</a>';
/* Flatten das boostrap */
.well, .navbar-inner, .popover, .btn, .tooltip, input, select, textarea, pre, .progress, .modal, .add-on, .alert, .table-bordered, .nav>.active>a, .dropdown-menu, .tooltip-inner, .badge, .label, .img-polaroid {
-moz-box-shadow: none !important;
-webkit-box-shadow: none !important;
box-shadow: none !important;
-webkit-border-radius: 0px !important;
-moz-border-radius: 0px !important;
border-radius: 0px !important;
border-collapse: collapse !important;
background-image: none !important;
@qutek
qutek / functions.php
Created April 10, 2014 08:05
Woocommerce Redirect After Clicking "Place Order" Button
<?php
/*========================================================
Custom Thankyou Page Woocommerce
Woocommerce snippest to redirect user after order sucessed
Place it to functions.php in theme directory
=========================================================*/
add_action( 'woocommerce_thankyou', function(){
global $woocommerce;
$order = new WC_Order();