Skip to content

Instantly share code, notes, and snippets.

@lvivski
lvivski / slider.css
Created February 6, 2011 18:58
really simple js slider for lists
.list {
overflow:hidden;
height:100%;
}
.control {
position:absolute;
display:block;
width:35px;
height:35px;
@lvivski
lvivski / gist:1226565
Created September 19, 2011 14:06
Simple hover for images with links in description
(function ($) {
$('a').hover(function () {
if ($(this).attr('href') != '') {
$('a[href="' + $(this).attr('href') + '"]').addClass('hover')
}
}, function () {
$('a').removeClass('hover')
});
})(jQuery);
@lvivski
lvivski / cicada.css
Created December 1, 2011 20:33 — forked from Zoramite/cicada.css
Cicada + CSS Backgrounds
.example1 {
background-color: #efefef;
background-image:
-webkit-linear-gradient(0, rgba(222,213,108,.07) 50%, transparent 50%),
-webkit-linear-gradient(0, rgba(201,184,88,.13) 50%, transparent 50%),
-webkit-linear-gradient(0, transparent 50%, rgba(168,137,73,.17) 50%),
-webkit-linear-gradient(0, transparent 50%, rgba(99,78,60,.19) 50%);
background-image:
-moz-linear-gradient(0, rgba(222,213,108,.07) 50%, transparent 50%),
-moz-linear-gradient(0, transparent 50%, rgba(201,184,88,.13) 50%),
@lvivski
lvivski / gist:1433851
Created December 5, 2011 14:55
SImple date regular expression
var dateRE = /(\d{4})?[\/\-]?([0-1](?=[0-2])\d|\d)[\/\-]?(\d{1,2})?/;
@lvivski
lvivski / index.html
Created December 15, 2011 16:15
IndeterminateCheckboxes
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Indeterminate Checkboxes</title>
<link rel="stylesheet" href="style.css">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script src="script.js"></script>
</head>
<body>
@lvivski
lvivski / 404.html
Created December 15, 2011 16:20
Not Found
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>404 Not Found</title></head> <body><h1>Not Found</h1><p>The requested URL was not found on this server.</p><p>お探しのURLはこのサーバーでは見つかりませんでした。</p><p>L&apos;URL que vous avez sollicit&eacute;e n&apos;a pas &eacute;t&eacute; trouv&eacute;e sur ce serveur.</p><p>Die URL, die Sie angefordert haben, wurde nicht auf diesem Server gefunden.</p></body></html>
@lvivski
lvivski / index.html
Created January 4, 2012 10:48
Verical align
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title>Vertical align</title>
<style type="text/css">
.wrap, .h, .f {
display: inline-block;
}
@lvivski
lvivski / index.html
Created January 21, 2012 19:43
Fixed To Browser Viewport
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Fixed To Browser Viewport ~ One Sidebar</title>
<style type="text/css">
* {margin:0; padding:0;}
body {
background:#CCF;
font:100% arial,"trebuchet ms",tahoma;
height: 100%;
@lvivski
lvivski / hack.sh
Created March 31, 2012 18:36 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@lvivski
lvivski / Queue.js
Created June 1, 2012 17:02 — forked from WebReflection/Queue.js
All you need to manage queues
function Queue(q) {"use strict";
// (C) WebReflection - Mit Style License
var
next = function next() {
return (callback = q.shift()) ? !!callback(q) || !0 : !1;
},
callback
;
(q.wait = function wait(condition, delay) {
condition || callback && q.unshift(callback);