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 | |
# 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 |
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
<?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 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 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 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 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 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 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 | |
/** | |
* Plugin Name: WP ERP Extends | |
* Description: Custom filters and hooks for WP ERP | |
*/ | |
add_filter( 'erp_hr_employee_types', 'erp_hr_employee_types_custom_types' ); | |
function erp_hr_employee_types_custom_types( $default_types ) { | |
$custom_types = [ | |
'custom_type_1' => 'Custom Type 1', |
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
I use the first | |
—– BEGIN LICENSE —– | |
Michael Barnes | |
Single User License | |
EA7E-821385 | |
8A353C41 872A0D5C DF9B2950 AFF6F667 | |
C458EA6D 8EA3C286 98D1D650 131A97AB | |
AA919AEC EF20E143 B361B1E7 4C8B7F04 |
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
# Your snippets | |
# | |
# Atom snippets allow you to enter a simple prefix in the editor and hit tab to | |
# expand the prefix into a larger code block with templated values. | |
# | |
# You can create a new snippet in this file by typing "snip" and then hitting | |
# tab. | |
# | |
# An example CoffeeScript snippet to expand log to console.log: | |
# |
OlderNewer