Skip to content

Instantly share code, notes, and snippets.

View zhishaofei3's full-sized avatar
🎯
Focusing

zhishaofei zhishaofei3

🎯
Focusing
View GitHub Profile
@zhishaofei3
zhishaofei3 / unlock.js
Created November 16, 2017 14:20 — forked from laziel/unlock.js
Unlock Web Audio in iOS 9 Safari
var ctx = null, usingWebAudio = true;
try {
if (typeof AudioContext !== 'undefined') {
ctx = new AudioContext();
} else if (typeof webkitAudioContext !== 'undefined') {
ctx = new webkitAudioContext();
} else {
usingWebAudio = false;
}
@zhishaofei3
zhishaofei3 / ws gist test
Created July 27, 2017 14:06
ws gist test
This file has been truncated, but you can view the full file.
[21:56:03] Starting 'clean-bundle'...
[21:56:03] Finished 'clean-bundle' after 3.42 ms
[21:56:03] Starting 'webpack'...
[21:56:13] [nodemon] restarting due to changes...
[21:56:13] [nodemon] restarting due to changes...
[21:56:13] [nodemon] restarting due to changes...
[21:56:13] [webpack] Hash: 0ed852c3f17111751fbb
Version: webpack 1.15.0
Time: 9547ms
Asset Size Chunks Chunk Names
<button class="btn1">1</button>
<button class="btn2">2</button>
@zhishaofei3
zhishaofei3 / bootstrap-2-moving-box-carousel.markdown
Created August 16, 2016 09:01
Bootstrap 2 Moving Box Carousel
@zhishaofei3
zhishaofei3 / bootstrap-3-contact-form-with-validation.markdown
Created August 16, 2016 09:01
Bootstrap 3 Contact form with Validation

Bootstrap 3 Contact form with Validation

A contact form built with Bootstrap 3. Field validation with Bootstrap Validator.

A Pen by zhishaofei on CodePen.

License.

@zhishaofei3
zhishaofei3 / index.html
Created August 16, 2016 06:46
Responsive Company Cards
<div class="full-width">
<div class='cf'>
<div class="Switch card">
<div class="Toggle"></div>
<span class="on"><i class="fa fa-th"></i></span>
<span class="off"><i class="fa fa-th-list"></i></span>
</div>
</div>
@zhishaofei3
zhishaofei3 / index.html
Created August 16, 2016 06:44
Responsive Company Cards
<div class="full-width">
<div class='cf'>
<div class="Switch card">
<div class="Toggle"></div>
<span class="on"><i class="fa fa-th"></i></span>
<span class="off"><i class="fa fa-th-list"></i></span>
</div>
</div>
@zhishaofei3
zhishaofei3 / index.html
Last active August 16, 2016 06:41
Responsive Slider
<header><h1>Responsive Slider</h1></header>
<section>
<div class="slider">
<div class="slide-viewer">
<div class="slide-group">
<div class="slide slide-1">
<img src="http://javascriptbook.com/code/c11/img/slide-1.jpg" alt="No two are the same" />
</div>
<div class="slide slide-2">
function throttle( fn, time ) {
var t = 0;
return function() {
var args = arguments, ctx = this;
clearTimeout(t);
t = setTimeout( function() {
fn.apply( ctx, args );
}, time );
};
@zhishaofei3
zhishaofei3 / 0_reuse_code.js
Created August 5, 2016 07:12
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console