Skip to content

Instantly share code, notes, and snippets.

View trafnar's full-sized avatar

Nathan Manousos trafnar

View GitHub Profile
def test
p "this is a test"
p "no its not"
end
//
// create closure
//
(function($) {
//
// plugin definition
//
$.fn.hilight = function(options) {
debug(this);
def baz(string)
baz = []
string.split(" ").size.times do {}
baz << "baz"
end
baz.join(" ")
end
p baz("hello world, how are you")
$(document).ajaxSuccess(function(){
$("#core-loader").fadeOut();
$("div#makeMeScrollable").smoothDivScroll({scrollingSpeed: 12, mouseDownSpeedBooster: 1, visibleHotSpots:"always"});
});
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>test</title>
<style type="text/css" media="screen">
#scrollme{width:500px; height:300px; overflow:auto;}
#scrollme ol{ width:3000;}
#scrollme ol li{width:200px; height:200px; margin-right:10px; background-color:red; float:left;}
</style>
<script type="text/javascript" charset="utf-8" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>test</title>
<style type="text/css" media="screen">
body{width:auto;}
.foo{background-color:yellow; -webkit-column-count:2; width:auto; height:100%;}
.foo .bar{float:left; width:40px; height:40px; background-color:#000;}
</style>
<style type="text/css" media="screen">
body{font-family:helvetica; color:#393A37; margin-top:150px;}
#screen{width:320px; height:480px; text-align:center;}
#screen_wrap{border:1px solid #393A37;; float:left;}
#screen h1{font-size:64px;}
#screen p{padding-top:150px;}
#center{margin:0 auto; width:322px; overflow:auto;}
</style>
<div id="center">
<style type="text/css">
img{display:none;}
</style>
<script type="text/javascript" charset="utf-8">
$('.link').hover(function(){
// first make sure all the images are hidden
@trafnar
trafnar / gist:367966
Created April 16, 2010 03:21
Examples of common CSS properties and techniques
<style type="text/css" media="screen">
*{margin:0; padding:0;}
h1,h2{margin-bottom:10px; margin-top:30px;}
body{padding:30px;}
</style>
<h1>floats</h1>
<h2>simple left/right</h2>
<style type="text/css" media="screen">
#simple_floats{overflow:auto; border:5px solid #092994; width:500px;}
#facebook #pagelet_pymkbox,
#facebook #pagelet_adbox,
#facebook #pagelet_connectbox,
#facebook #pagelet_chat_home,
#facebook #bookmarks_menu #uiSideNav{display:none;}