Skip to content

Instantly share code, notes, and snippets.

@wutupake
wutupake / gist:1eb1e875be45d64bf2ab
Created May 19, 2015 15:25
SCSS: mixin for css3 transition
// usage: @include transition(width, .1s, ease-in-out, 0);
// transition: [transition-property] [transition-duration] [transition-timing-function] [transition-delay];
@mixin transition ($property, $duration, $timing, $delay) {
-webkit-transition-property: $property;
-webkit-transition-duration: $duration;
-webkit-transition-timing-function: $timing;
-webkit-transition-delay: $delay;
-moz-transition-property: $property;
-moz-transition-duration: $duration;
-moz-transition-timing-function: $timing;
@wutupake
wutupake / fb_fanpage.html
Created April 20, 2011 08:24
Se le dimensioni della fan page superano 520px X 800px, usare questo metodo (OLDES)
<html>
<body style="overflow: hidden;margin:0px;padding:0px">
<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js"></script>
<script>
window.fbAsyncInit = function() {
FB.Canvas.setAutoResize();
@wutupake
wutupake / input.js
Created November 23, 2011 17:01
JS: input form - seleziono il contenuto al load della pagina (fix per CHROME)
$("input[name='answer']").focus(function(){
this.select();
});
// fix per CHROME
$("input[name='answer']").mouseup(function(e){
e.preventDefault();
});
@wutupake
wutupake / index.html
Created October 2, 2012 13:52
JS: Scroll to the top of the page
<a name="top"></a> ... <a href="#top">Back to top</a>
@wutupake
wutupake / url_only.php
Created November 7, 2012 18:22
WP: Next/Previous Post URL only
<?php if (get_adjacent_post(false, '', false)): // if there are newer posts ?>
<a href="<?php echo get_permalink(get_adjacent_post(false,'',false)); ?>" class="article-nav prev">&nbsp;</a>
<?php endif; ?>
<?php if (get_adjacent_post(false, '', true)): // if there are older posts ?>
<a href="<?php echo get_permalink(get_adjacent_post(false,'',true)); ?>" class="article-nav next">&nbsp;</a>
<?php endif; ?>
@wutupake
wutupake / Fetch.sublime-settings
Created January 23, 2013 14:40
SUBLIME TEXT: list of "fetch stuff" that i like
{
"files":
{
"backbone": "http://backbonejs.org/backbone-min.js",
"jquery": "http://code.jquery.com/jquery.min.js",
"raphaeljs": "http://github.com/DmitryBaranovskiy/raphael/raw/master/raphael-min.js",
"underscore": "http://underscorejs.org/underscore-min.js"
},
"packages":
{
/*
#ie10 will only be red in MSIE 10,
both in high contrast (display setting) and default mode
*/
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
#ie10 { color: red; }
}
@wutupake
wutupake / box-model.css
Created February 15, 2013 07:46
CSS: box-model where [width] = [element-width] + [padding] + [borders]
*,
*:after,
*:before {
box-sizing: border-box;
}
{
"caret_style": "smooth",
"color_scheme": "Packages/Color Scheme - Default/Solarized (Dark).tmTheme",
"draw_white_space": "all",
"file_exclude_patterns":
[
"*.tmLanguage.cache",
"*.tmPreferences.cache",
"*.psd",
"*.psb",
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Facebook batch photo download</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>