IMPORTANT!

Snipt is going open source. We've toyed with this idea for quite a while, and have finally decided it's the right way to move forward.

A few things:
  • The entire Snipt source code will be released on GitHub under the 3-clause BSD License on Friday, September 10th.
  • While we'd like to think we're perfect, we realize we're only human. By open sourcing the software that runs this website, certain bugs or security flaws may be discovered that could compromise the privacy of your snipts.
  • Only the Lion Burger team will be able to push commits to the Snipt.net site. Contributors should send a pull request to add new features or submit patches.
  • By using this site, you agree not to be too angry or take any legal action against Lion Burger should this whole thing go up in flames some day.
  • Follow us on Twitter for updates.
I agree, close this message
Sign up to create your own snipts, or login.

Latest 100 public snipts » curosio's snipts The latest snipts from curosio.

showing 1-16 of 16 snipts
  • New window jQuery
    $(function(){
        $('a.new-window').click(function(){
            window.open(this.href);
            return false;
        });
    });
    

    copy | embed

    0 comments - tagged in  posted by curosio on Mar 09, 2010 at 5:46 a.m. EST
  • link like button
    a:active {
      position: relative;
      top: 1px;
    }
    

    copy | embed

    0 comments - tagged in  posted by curosio on Feb 02, 2010 at 3:17 a.m. EST
  • New clearfix
    /* new clearfix */
    .clearfix:after {
    	visibility: hidden;
    	display: block;
    	font-size: 0;
    	content: " ";
    	clear: both;
    	height: 0;
    	}
    * html .clearfix             { zoom: 1; } /* IE6 */
    *:first-child+html .clearfix { zoom: 1; } /* IE7 */
    

    copy | embed

    0 comments - tagged in  posted by curosio on Dec 15, 2009 at 8:38 a.m. EST
  • RGB CSS Opacity
    h1 {
    background: transparent url(black50.png);
    background: rgba(0, 0, 0, 0.5) none;
    }
    
    div {
    color: rgb(0, 0, 0);
    background-color: rgb(255, 255, 255);
    border: 10px solid rgba(255, 255, 255, 0.3);
    }
    

    copy | embed

    0 comments - tagged in  posted by curosio on Dec 01, 2009 at 5:25 a.m. EST
  • detect iphone
    .htaccess
    
    #redirect mobile browsers
    RewriteCond %{HTTP_USER_AGENT} ^.*iPhone.*$
    RewriteRule ^(.*)$ http://mobile.yourdomain.com [R=301]
    RewriteCond %{HTTP_USER_AGENT} ^.*BlackBerry.*$
    RewriteRule ^(.*)$ http://mobile.yourdomain.com [R=301]
    RewriteCond %{HTTP_USER_AGENT} ^.*Palm.*$
    RewriteRule ^(.*)$ http://mobile.yourdomain.com [R=301]
    
    Javascript
    
    <script language=javascript>
    <!–
    if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)))
    {
    location.replace("iphone-version.html");
    }
    –>
    </script>
    

    copy | embed

    0 comments - tagged in  posted by curosio on Nov 02, 2009 at 3:55 a.m. EST
  • movil snipts
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="es-ES">
    
    <link rel="apple-touch-icon" href="/img/apple-touch-icon.png"/>
    <link href="http://www.flickr.com/favicon.ico" rel="shortcut icon">
    
    <style type="text/css">@import url("importscreen.css") screen;</style>
    <style type="text/css">@import url("importhandheld.css") handheld;</style>
    <link rel="stylesheet" type="text/css" media="screen" href="linkscreen.css" />
    <link rel="stylesheet" type="text/css" media="handheld" href="linkhandheld.css" />
    
    <meta name="HandheldFriendly" content="True" />
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta name="viewport" content="width=240"/>
    <meta name="viewport" content="initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
    <link media="only screen and (max-device-width: 480px)" href="/css/iphone.css" type="text/css" rel="stylesheet" />
    

    copy | embed

    0 comments - tagged in  posted by curosio on Aug 19, 2009 at 6:13 a.m. EDT
  • CDATA
    /* <![CDATA[ */
    /* ]]> */
    

    copy | embed

    0 comments - tagged in  posted by curosio on Mar 26, 2009 at 6:40 a.m. EDT
  • Image Rollover Borders
    /*Inner Borders*/
    #example-one a img, #example-one a { border: none; overflow: hidden; float: left; }
    #example-one a:hover { border: 3px solid black; }
    #example-one a:hover img { margin: -3px; }
    
    /*Outer Borders*/
    #example-two a img, #example-two a { border: none; float: left; }
    #example-two a { margin: 3px; }
    #example-two a:hover { outline: 3px solid black; }
    

    copy | embed

    0 comments - tagged in  posted by curosio on Mar 12, 2009 at 4:22 a.m. EDT
  • inline block 4 all
    li {
           width: 200px;
           min-height: 250px;
           border: 1px solid #000;
           display: -moz-inline-stack; /* FF2*/
           display: inline-block;
           vertical-align: top; /* BASELINE CORRECCIÓN*/
           margin: 5px;
           zoom: 1; /* IE7 (hasLayout)*/
           *display: inline; /* IE */
           _height: 250px; /* IE6 */
       }
    

    copy | embed

    0 comments - tagged in  posted by curosio on Mar 03, 2009 at 11:40 a.m. EST
  • css font size
    body {
            font: normal 100%/1.375 Helvetica, Arial, sans-serif;	/* 22px / 16px = 1.375 */
    }
    
    h1 {
    	font-family: Georgia, serif;
    	font-size: 1.5em;
    	line-height: 0.91667em;	/* 22px / 24px = 0.91667em */
    	margin: 0.5em 0;
    }
    
    ul {
    	font-size: 0.875em;		/* 14px / 16px = 0.875em */
    	line-height: 1.28571;	/* 18px / 14px = 1.28571 */
    }
    
    li {
    	margin-bottom: 0.42857em;	/* 6px / 14px = 0.42857em */
    }
    

    copy | embed

    0 comments - tagged in  posted by curosio on Mar 03, 2009 at 3:21 a.m. EST
  • menu jquery dropdown
    $(function(){
        $("ul.dropdown li").hover(function(){
            $(this).addClass("hover");
            $('ul:first',this).css('visibility', 'visible');
        }, function(){
            $(this).removeClass("hover");
            $('ul:first',this).css('visibility', 'hidden');
        });
        $("ul.dropdown li ul li:has(ul)").find("a:first").append(" &raquo; ");
    });
    
    -------------------------------------------------- & the html
    
    <ul class="dropdown">
        <li><a href="#">Lorem</a>
            <ul class="sub_menu">
                <li><a href="#">Lorem</a></li>
                <li><a href="#">Lorem</a>
                    <ul>
                        <li><a href="#">Lorem</a></li>
                        <li><a href="#">Lorem</a></li>
                    </ul>
                </li>
                <li><a href="#">Lorem</a></li>
                <li><a href="#">Lorem</a></li>
            </ul>
        </li>
    </ul>
    

    copy | embed

    0 comments - tagged in  posted by curosio on Feb 26, 2009 at 3:42 a.m. EST
  • reset css
    html{color:#000;background:#FFF;}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td{margin:0;padding:0;}table{border-collapse:collapse;border-spacing:0;}fieldset,img{border:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}li{list-style:none;}caption,th{text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}q:before,q:after{content:'';}abbr,acronym {border:0;font-variant:normal;}sup {vertical-align:text-top;}sub {vertical-align:text-bottom;}input,textarea,select{font-family:inherit;font-size:inherit;font-weight:inherit;}input,textarea,select{*font-size:100%;}legend{color:#000;}body {font:13px/1.231 helvetica,arial,clean,sans-serif;*font-size:small;*font:x-small;}table {font-size:inherit;font:100%;}pre,code,kbd,samp,tt{font-family:monospace;*font-size:108%;line-height:100%;}
    

    copy | embed

    0 comments - tagged in  posted by curosio on Feb 25, 2009 at 9:27 a.m. EST
  • base CSS style
     /* =============================================================== */  /* 00. base styles */
    /* set base body ................................................. */ body {font:13px/1 arial,trebuchet MS,tahoma,helvetica,clean,sans-serif; background:#000; color:#fff;}
    /* general reset ................................................. */ * {margin:0; padding:0;} html, body, form, img, fieldset, legend, table, tbody, thead, tfoot, tr, th, td {border:none;} li {list-style:none;}
    /* hide elements from screen but not from source ................. */ .hidden {position:absolute !important; top:-999em; left:-999em;}
    /* clearfix class ................................................ */ .clearfix:after {content:"."; display:block; height:0; clear:both; visibility:hidden;} .clearfix {display:inline-block; display:block;} 
    

    copy | embed

    0 comments - tagged in  posted by curosio on Feb 13, 2009 at 3:45 a.m. EST
  • shortest way to test browser
    //Firefox
    FF=/a/[-1]=='a'
    
    //Firefox 3
    FF3=(function x(){})[-5]=='x'
    
    //Firefox 2
    FF2=(function x(){})[-6]=='x'
    
    //IE
    IE='\v'=='v'
    
    //Safari
    Saf=/a/.__proto__=='//'
    
    //Chrome
    Chr=/source/.test((/a/.toString+''))
    
    //Opera
    Op=/^function \(/.test([].sort)
    
    All:
    
    B=(function x(){})[-5]=='x'?'FF3':(function x(){})[-6]=='x'?'FF2':/a/[-1]=='a'?'FF':'\v'=='v'?'IE':/a/.__proto__=='//'?'Saf':/s/.test(/a/.toString)?'Chr':/^function \(/.test([].sort)?'Op':'Unknown'
    

    copy | embed

    0 comments - tagged in  posted by curosio on Jan 29, 2009 at 3:36 a.m. EST
  • transparent css all browsers
    .transparent {
    	filter:alpha(opacity=50);
    	-moz-opacity:0.5;
    	-khtml-opacity: 0.5;
    	opacity: 0.5;
    }
    
    new:
    
    .transparent {
        filter: alpha(opacity=50); /* internet explorer */
        -khtml-opacity: 0.5;      /* khtml, version anterior de safari */
        -moz-opacity: 0.5;       /* firefox, mozilla, netscape */
        opacity: 0.5;           /* safari, chrome, opera */
        -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"; /*internet explorer 8 - gracias Andres */
        }
    

    copy | embed

    2 comments - tagged in  posted by curosio on Dec 30, 2008 at 8:11 a.m. EST
  • ie max & min width
    /* Fallback if JavaScript is disabled */
        width: 960px;
    
        /* JS-Expression for min-/max-width simulation */
        width: expression((document.documentElement && document.documentElement.clientHeight) ? ((document.documentElement.clientWidth < 740) ? "740px" : ((document.documentElement.clientWidth > (80 * 16 * (parseInt(this.parentNode.currentStyle.fontSize) / 100))) ? "80em" : "auto" )) : ((document.body.clientWidth < 740) ? "740px" : ((document.body.clientWidth > (80 * 16 * (parseInt(this.parentNode.currentStyle.fontSize) / 100))) ? "80em" : "auto" )));
    
    
    or the easyer with px:
    
    width:expression(document.body.clientWidth < 742? "740px" : document.body.clientWidth > 1070? "968px" : "auto") !important;
    

    copy | embed

    0 comments - tagged in  posted by curosio on Dec 11, 2008 at 3:32 a.m. EST
Sign up to create your own snipts, or login.