Skip to content

Instantly share code, notes, and snippets.

View tiaozi0912's full-sized avatar

Yujun Wu tiaozi0912

  • Nest / Google
  • Palo Alto, CA
View GitHub Profile
@tiaozi0912
tiaozi0912 / sample.conf
Created December 11, 2014 19:59
Nginx conf for html5mode
server {
listen 80;
server_name myserver.com;
root /www/website/dist;
index index.html;
location / {
try_files $uri $uri/ /index.html;
}
}
@tiaozi0912
tiaozi0912 / Triangle mixin
Created September 14, 2014 17:26
Mixin for triangle bubble with border
/**
* mixin for rendering triangle bubble for direction: left, right, top, bottom;
*/
@mixin bubble($direction:left, $size:10px, $top:10px, $right:auto, $bottom:auto, $left:-10px, $color:white, $border-color:'', $border-width:1px) {
@if $border-color != '' {
// Render the bubble border
&:before {
@include bubble-base($direction, $size, $top, $right, $bottom, $left, $border-color);
}
@tiaozi0912
tiaozi0912 / gist:76019104a97b13739a91
Created August 27, 2014 21:11
Solution for the Youtube Iframe API Firefox issue that player.playVideo() doesn't work
var playerConfig = {}, // Define the player config here
queue = { // To queue a function and invoke when player is ready
content: null,
push: function(fn) {
this.content = fn;
},
pop: function() {
this.content.call();
this.content = null;
}