Skip to content

Instantly share code, notes, and snippets.

View dsebao's full-sized avatar
🏠
Working from home

Sebastian Ortiz dsebao

🏠
Working from home
View GitHub Profile
@dsebao
dsebao / tooltip.js
Created October 28, 2013 13:46
Tooltip with jquery
$('.addtooltip').each(function() {
var title = $(this).attr('title');
$(this).data('tipText', title).removeAttr('title');
}).hover(function(){
$('<p class="tooltipx"></p>').text($(this).data('tipText')).appendTo('body').fadeIn('slow');
}, function() {
$('.tooltipx').remove();
}).mousemove(function(e) {
var mousex = e.pageX + 20;
var mousey = e.pageY + 25;
@dsebao
dsebao / accordion.js
Created October 28, 2013 14:21
Accordion content jquery
$(".acordion-title").click(function() {
$nextdiv = $(this).next("div");
if($nextdiv.is(":visible")){
$nextdiv.slideUp();
$('span',this).removeClass('menos');
} else {
$(".acordion-desc").slideUp();
$(this).parent().find('.acordion-title span').removeClass('menos');
$('span',this).addClass('menos');
$nextdiv.slideToggle();
@dsebao
dsebao / index.html
Created November 6, 2013 19:54
Use includes in HTML!
<div class="js-include" title="nav.html"></div>
@dsebao
dsebao / terminal
Created November 21, 2013 04:27
Show&Hide hidden folders and files on MacOSX
defaults write com.apple.finder AppleShowAllFiles TRUE; killall Finder
defaults write com.apple.finder AppleShowAllFiles FALSE; killall Finder
@dsebao
dsebao / face-og.html
Last active April 8, 2019 18:16
Facebook open graph
<!-- en el header -->
<meta property="og:title" content="Titulo del sitio" />
<meta property="og:description" content="Descripcion" />
<meta property="og:type" content="website"/>
<meta property="og:url" content="http://sitio.com.ar" />
<meta property="og:image" content="http://sitio.com.ar/images/logo.png"/>
<!-- para ver si se ve bien
@dsebao
dsebao / functions.php
Created December 13, 2013 13:23
Crop images from the top/left in WordPress without hack the core
<?php
/*
*
*
* Crop desde arriba de las imagenes
*
*
*/
@dsebao
dsebao / new_gist_file.txt
Created December 28, 2013 02:48
Chrome allow files access (work with less localy)
open /Applications/Google\ Chrome.app --args --allow-file-access-from-files
@dsebao
dsebao / Mobile_Detect.php
Created January 17, 2014 18:44
Detectar dispositivos moviles con php
<?php
/**
* Mobile Detect Library
* =====================
*
* Motto: "Every business should have a mobile detection script to detect mobile readers"
*
* Mobile_Detect is a lightweight PHP class for detecting mobile devices (including tablets).
* It uses the User-Agent string combined with specific HTTP headers to detect the mobile environment.
*
@dsebao
dsebao / function.php
Created March 10, 2014 15:44
Use email instead of loginname in WP
<?php
/*
*
*
* Usar mails para el login en vez de usuarios
*
*
*/
remove_filter( 'authenticate', 'wp_authenticate_username_password', 20, 3 );
@dsebao
dsebao / script.js
Last active March 10, 2018 06:45
Easy scroll to jquery
function smooth(){
$('a.toscroll').click(function() {
if (location.pathname.replace(/^\//,"") == this.pathname.replace(/^\//,"") || location.hostname == this.hostname) {
var target = $(this.hash);
target = target.length ? target : $("[name=" + this.hash.slice(1) + "]");
if ( target.length ) {
$("html, body").animate({ scrollTop: target.offset().top - 120}, 1000);
return false;
}
}