Skip to content

Instantly share code, notes, and snippets.

@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":
{
@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; ?>
<div class="myvideo">
<iframe src="http://www.youtube.com/embed/MY-VIDEO" frameborder="0" allowfullscreen></iframe>
</div>
@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 / 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 / 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();