Skip to content

Instantly share code, notes, and snippets.

Brian Li bwhli

Block or report user

Report or block bwhli

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View wp
<?php get_header(); ?>
<div class="posts">
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<div class="post">
<h1 class="post-title">
<a href="<?php the_permalink(); ?>">
<?php the_title(); ?>
</a>
</h1>
View rel="canonical"
<link rel="canonical" href="https://brianli.com/how-to-republish-to-medium-with-rel-canonical/" />
View AMAZON_AWS_IAM_KEYPAIR
User Name,Access Key Id,Secret Access Key
"jarjarbinks",AKIAIYFWEWC6W5BWJFKG,RQjn8AGQ26jpWtBqH+JcOk4ZSopQYQbLlC2fjWr+
View AMAZON_S3_PUBLIC_BUCKET_POLICY
{
"Version": "2008-10-17",
"Statement": [
{
"Sid": "AllowPublicRead",
"Effect": "Allow",
"Principal": {
"AWS": "*"
},
"Action": "s3:GetObject",
View Redirect YOURLS Root URL
<?php
header('Location:http://yoururl.com/');
?>
View YOURLS Configuration 2 fo 2
<?php
/* This is a sample config file.
* Edit this file with your own settings and save it as "config.php"
*
* IMPORTANT: edit and save this file as plain ASCII text, using a text editor, for instance TextEdit on Mac OS or
* Notepad on Windows. Make sure there is no character before the opening <?php at the beginning of this file.
*/
/*
** MySQL settings - You can get this info from your web host
View YOURLS Configuration 1 of 2
<?php
/* This is a sample config file.
* Edit this file with your own settings and save it as "config.php"
*
* IMPORTANT: edit and save this file as plain ASCII text, using a text editor, for instance TextEdit on Mac OS or
* Notepad on Windows. Make sure there is no character before the opening <?php at the beginning of this file.
*/
/*
** MySQL settings - You can get this info from your web host
@bwhli
bwhli / mejs_visibility_workaround
Created Mar 16, 2016
MEJS Visibility Workaround
View mejs_visibility_workaround
add_filter( 'wp_audio_shortcode', 'audio_short_fix', 10, 5 );
function audio_short_fix( $html, $atts, $audio, $post_id, $library )
{
$html = str_replace ( 'visibility: hidden;' ,'' , $html );
return $html;
}
View WooCommerce Product Attributes 7
<?php
/**
* Product attributes
*
* Used by list_attributes() in the products class
*
* @author WooThemes
* @package WooCommerce/Templates
* @version 2.1.3
*/
View WooCommerce Product Attributes 6
<?php
/**
* Product attributes
*
* Used by list_attributes() in the products class
*
* @author WooThemes
* @package WooCommerce/Templates
* @version 2.1.3
*/
You can’t perform that action at this time.