Skip to content

Instantly share code, notes, and snippets.

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

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

@wakasann
wakasann / gist:5fb7ce4db435eb0054d036462e626ee0
Last active September 9, 2016 03:44
wordpress write debug log
<?php
/**
* Plugin Name: Write log
* Plugin URI:
* Description: Writes a message to /wp-content/debug.log if debugging is turned on.
* Version: 1.0.0-dev
* Author: wakasann
* Author URI: http://wakasann.github.io/
* Requires at least: 4.4
* Tested up to: 4.5
@wakasann
wakasann / gist:331e5307ee8b8ffd1f2a4ea981ffa906
Created November 9, 2016 01:53
disable wordpress autosave
/**
* @link http://wordpress.stackexchange.com/questions/5584/possible-to-turn-off-autosave-for-single-custom-post-type
*/
add_action( 'admin_enqueue_scripts', 'ezapp_module_enqueue_scripts' );
function ezapp_module_enqueue_scripts() {
if ( 'ezapp_module' == get_post_type() )
wp_dequeue_script( 'autosave' );
}
@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
*/
@wakasann
wakasann / yii2andorlike.php
Last active November 18, 2016 04:05
yii2 where or and like
<?php
// where status='Open' and category='1' and subCategory='1' and (category like '%test%' or subCategory like '%test%' or title like '%test%' or introduction like '%test%')
//@link http://stackoverflow.com/a/31558035/5840474 get and or
//@link http://stackoverflow.com/a/28593956/5840474 get like
$where = array(
array(
'and',
"status='Open'"
)
);
//Port 13 +
//resistance(电阻)
//Led(辨别LED灯正负极:1.长脚是正极,短脚是负极;2.发光二极管管体内部金属极较小的是正极,大的片状的是负极)
//Port GND -
int ledPin = 13;
void setup()
{
pinMode(ledPin,OUTPUT);
}
//set controll led number IO foot
int Led1 = 2;
int Led2 = 3;
int Led3 = 4;
int Led4 = 5;
int Led5 = 6;
int Led6 = 7;
//led style 1
int brightness =0; //defined the int var brightness and set the init value,it is use to show the led light
int fadeAmount = 5; //defined int var fadeAmount,it use to set the light add/mins count
void setup()
{
pinMode(9,OUTPUT); //set the prot 9 is output port
}
void loop()
{