Skip to content

Instantly share code, notes, and snippets.

View zigotica's full-sized avatar

Sergi Meseguer zigotica

View GitHub Profile
@zigotica
zigotica / youtube-poster-frame.css
Last active July 8, 2023 10:12
Very simple method to add custom poster frame to youtube video without using youtube API. This code is also valid in browsers not supporting window.postMessage (API uses postMessage). The trick is adding the iframe in a comment. Javascript reads comment contents and saves iframe definition to a var. When JQuery (for the sake of brevity, not real…
.video { position: relative; padding-bottom: 56.25%; /* 16:9 */ height: 0; }
.video img { position: absolute; display: block; top: 0; left: 0; width: 100%; height: 100%; z-index: 20; cursor: pointer; }
.video:after { content: ""; position: absolute; display: block;
background: url(play-button.png) no-repeat 0 0;
top: 45%; left: 45%; width: 46px; height: 36px; z-index: 30; cursor: pointer; }
.video iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
/* image poster clicked, player class added using js */
.video.player img { display: none; }
.video.player:after { display: none; }
@zigotica
zigotica / Preferences.Sublime-settings
Last active December 13, 2015 18:18
Sublime user preferences
{
"auto_complete_with_fields": true,
"binary_file_patterns":
[
"*.jpg",
"*.jpeg",
"*.png",
"*.gif",
"*.ttf",
"*.tga",
import Ember from 'ember';
export default Ember.Component.extend({
tagName: 'button',
click() {
let action = this.get('action');
if (typeof action === 'function') {
action();
}
#####################################################################################
# PATH
#####################################################################################
export homebrew="/usr/local/bin:/usr/local/sbin"
export PATH="$homebrew:$PATH"
export PATH="/usr/local/heroku/bin:$PATH"
export PATH="/opt/anaconda2/bin:$PATH"
export NVM_DIR="/Users/zgtc/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm