Skip to content

Instantly share code, notes, and snippets.

View hectorpalmatellez's full-sized avatar

Héctor Palma Téllez hectorpalmatellez

View GitHub Profile
@hectorpalmatellez
hectorpalmatellez / hack.sh
Last active December 14, 2015 15:39 — forked from kyuumeitai/hack.sh
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@mixin hp-opacity($trans) {
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=#{$trans * 100})";
filter: alpha(opactiy=($trans * 100));
-moz-opacity: $trans;
-khtml-opacity: $trans;
opacity: $trans;
}
@hectorpalmatellez
hectorpalmatellez / transparente
Last active December 29, 2015 13:09
Mixin en Compass para generar transparencias compatibles desde IE viejo en adelante. Con RGBA para lo moderno.
@mixin transparencia($color, $alpha) {
$rgba: rgba($color, $alpha);
$ie-hex-str: ie-hex-str($rgba);
background-color: transparent;
background-color: $rgba;
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#{$ie-hex-str},endColorstr=#{$ie-hex-str});
zoom: 1;
}
// Uso:
// @include transparencia(#[color], 1);
@hectorpalmatellez
hectorpalmatellez / .git-config
Created December 3, 2013 14:08
Añadir esto en `.git/config` para que cada vez que se use `git log` aparezca: * ID del commit * Fecha ([Fri Nov 22 14:47]) * Nombre del usuario que hizo el commit * Mensaje del commit
[format]
pretty = %Cblue%h%Creset %Cgreen[%ad%x08%x08%x08%x08%x08%x08%x08%x08%x08%x08%x08%x08%x08%x08]%Creset (%an) %s
@hectorpalmatellez
hectorpalmatellez / repimg.scss
Last active August 29, 2015 13:56
Mixin para reemplazar texto con una imagen en Compass
@mixin repimg($img, $ancho, $alto) {
display: block;
text-indent: -9999px;
background: {
image: url($img);
repeat: no-repeat;
}
width: $ancho;
height: $alto;
}
@hectorpalmatellez
hectorpalmatellez / gist:9442370
Last active August 29, 2015 13:57
Mixin para anchos condicionales a ancho del dispositivo (usando media queries)
@mixin tipodecelular($breakpoint, $ancho, $alto) {
@media screen and (max-width: $breakpoint) {
width: $ancho;
height: $alto;
}
}
// Teniendo algo como lo siguiente:
// Breakpoints
$break-small: 320px;
// http://viljamis.com/blog/2013/prototyping-responsive-typography/?utm_source=Responsive+Design+Weekly&utm_campaign=76e7785581-Responsive_Design_Weekly_046&utm_medium=email
$browser-context: 16; // Default
@function em($pixels, $context: $browser-context) {
@return #{$pixels/$context}em
}
## Using Oh-my-szh
## Place in .zshrc `alias servidorcito="python -m SimpleHTTPServer 8000"`
## After restarting the Terminal, you could put yourself in any folder of your computer and run `$ servidorcito` to open it in your browser by typing localhost:8000
// Generated on 2014-06-03 using generator-bones 0.0.4
// Optimizado para uso en Octano
'use strict';
var LIVERELOAD_PORT = 35729;
var lrSnippet = require('connect-livereload')({port: LIVERELOAD_PORT});
var mountFolder = function (connect, dir) {
return connect.static(require('path').resolve(dir));
};

Keybase proof

I hereby claim:

  • I am hectorpalmatellez on github.
  • I am hpt (https://keybase.io/hpt) on keybase.
  • I have a public key whose fingerprint is BB2D D936 494E 3B98 2DD9 CC47 CB02 025B 9BDD 5A30

To claim this, I am signing this object: