Skip to content

Instantly share code, notes, and snippets.

@wakasann
wakasann / functions.php
Created December 25, 2018 10:34 — forked from lmartins/functions.php
By default WooCommerce redirects the user to the My Account page after a successful login. You may change this and use a custom URL based on the user role, like the Dashboard for admins and My Account page for customers. To do this, add this code at the end of the file functions.php located in wp-content/themes/your-theme-name/ https://support.w…
<?php
/**
* Redirect users to custom URL based on their role after login
*
* @param string $redirect
* @param object $user
* @return string
*/
function wc_custom_user_redirect( $redirect, $user ) {
// Get the first of all the roles assigned to the user
@wakasann
wakasann / helpers.php
Created November 17, 2016 02:54 — forked from mabasic/helpers.php
config_path function for Lumen framework
<?php
if ( ! function_exists('config_path'))
{
/**
* Get the configuration path.
*
* @param string $path
* @return string
*/

HTML5 MP3 MixTape DJ Set Player

HTML5 ready, MP3 MixTape & DJ Set Internet Audio Player. Works great in Google Chrome! Click twice to start. Inspired by the SoundManager2 cassette-tape UI project. Uses one long mp3 with multiple songs / tracks and cue's them up to an exact set time. Like a timestamped track-list on Mixcloud.com

I only know enough javascript, to hack it! :-) Right now it does not like to play nice w/ IE 8 and some versions of Firefox. The main change was the placement of the mp3 file inside the html code; to simply call on one JS file.

I like to get it more responsive to size correctly. It can work on an iPone 4S, but it is too big and overlaps. I was able port this into a nice Wordpress plugin, but it would not stay center within the div tags... I also would love to see the names of the song and artist scroll in the tape label field...

If want to reach out to me for any reason you can contact me on my G+ page: https://plus.google.com/+BryanLittle/ Or if

Git常用备忘.md

引自:http://blogread.cn/it/article/6282?f=sa

配置

git config --global user.name "robbin"  
git config --global user.email "fankai@gmail.com"
git config --global color.ui true