Skip to content

Instantly share code, notes, and snippets.

Avatar

Sergi Meseguer zigotica

View GitHub Profile
View .bash_profile
#####################################################################################
# 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
View components.close-button.js
import Ember from 'ember';
export default Ember.Component.extend({
tagName: 'button',
click() {
let action = this.get('action');
if (typeof action === 'function') {
action();
}
@zigotica
zigotica / Preferences.Sublime-settings
Last active December 13, 2015 18:18
Sublime user preferences
View Preferences.Sublime-settings
{
"auto_complete_with_fields": true,
"binary_file_patterns":
[
"*.jpg",
"*.jpeg",
"*.png",
"*.gif",
"*.ttf",
"*.tga",
@zigotica
zigotica / youtube-poster-frame.css
Last active January 23, 2023 20:30
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…
View youtube-poster-frame.css
.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; }