This file contains hidden or 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
| # Customized version of Nt9 oh-my-zsh theme | |
| # https://github.com/lenguyenthanh/nt9-oh-my-zsh-theme | |
| # resources: | |
| # html symbols: http://htmlarrows.com/ | |
| local ret_status="%{%F{blue}%}$USER@$HOST%{$reset_color%}" | |
| local return_status="%{$fg[red]%}%(?..↵)%{$reset_color%} " | |
| function _prompt_char() { |
This file contains hidden or 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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>Document</title> | |
| <script src="http://localhost/unique-dev/wp-includes/js/jquery/jquery.js?ver=1.11.3"></script> | |
| </head> | |
| <body> | |
| <a href="http://google.com" target="_blank">Go to google</a> |
This file contains hidden or 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
| <?php | |
| add_filter( 'post_link', 'filter_search_result_post_link', 10, 3 ); | |
| function filter_search_result_post_link( $permalink, $post, $leavename ) { | |
| if ( is_search() && in_the_loop() ) { | |
| $permalink = add_query_arg( 'ref', 'search', $permalink ); | |
| } | |
| return $permalink; | |
| } |
This file contains hidden or 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
| <ul> | |
| <?php | |
| $args = array( | |
| 'post_type' => 'product', | |
| 'posts_per_page' => 3, | |
| ); | |
| $query = new WP_Query( $args ); | |
| ?> |
This file contains hidden or 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
| /* | |
| * custom pagination with bootstrap .pagination class | |
| * source: http://www.ordinarycoder.com/paginate_links-class-ul-li-bootstrap/ | |
| */ | |
| function bootstrap_pagination( $echo = true ) { | |
| global $wp_query; | |
| $big = 999999999; // need an unlikely integer | |
| $pages = paginate_links( array( |
This file contains hidden or 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
| <?php | |
| /***************************************************** | |
| ==================PARENT THEME========================= | |
| ******************************************************/ | |
| /** | |
| * Suppose this is the function that contains the cmb2 metaboxes | |
| * in your parent theme. We want to change the name of the first | |
| * metabox from "Banner Text" to "Banner Content" and then change it's | |
| * type from "text" to "textarea" |
This file contains hidden or 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 | |
| # usage: save this script as mac.sh in your home folder. open a teminal and give following command | |
| # bash +x mac.sh | |
| eth=`nmcli d | grep eth | awk '{print $1}'` | |
| mac='YOUR_MAC_ADDRESS' | |
| sudo ifconfig $eth hw ether $mac | |
| sudo service network-manager restart |
NewerOlder