Skip to content

Instantly share code, notes, and snippets.

View joneff's full-sized avatar

Иван Жеков joneff

View GitHub Profile
@joneff
joneff / Proto.Tabs.js
Created September 2, 2009 13:09 — forked from RStankov/gist:179320
Tabs
<div class="tab-panel">
<nav class="tabs">
<ul>
<li href="#sect-1">tab 1</li>
<li href="#sect-2">tab 2</li>
<li href="#sect-3">tab 3</li>
</ul>
</nav>
<section id="sect-1"></section>
<section id="sect-2"></section>
@joneff
joneff / siblings.js
Created September 2, 2009 21:37
element.getSiblings()
function siblngs(element) {
if (!element) return [];
element = element.parentNode.firstChild, elements = [];
while (element) {
if (element.nodeType == 1 && element != arguments[0]) elements.push(element);
element = element.nextSibling;
}
return elements;
}
@joneff
joneff / pngFix.js
Created March 15, 2010 09:32
pngFix.js
(function() {
// Who said browser sniffing is bad?
if (! /MSIE (5\.5|6\.)/.test(navigator.userAgent) )
return;
function applyFilter(element, src) {
element.currentStyle.display == "block"
? null
: element.style.display = "inline-block";
<!-- customer view template -->
<div class="item-customer">
<span class="thumb">
{{customer_logo}}
</span>
<h2>
{{customer_name}}
</h2>
<div>
{{customer_short_desc}}
details, summary {display: block;}
details:not([open]) > :not(summary) {display: none;}
q {
quotes: "“" "”" "‘" "’";
}
# apache/conf/extra/httpd-php.conf
# PHP
LoadFile "/usr/bin/php/php5ts.dll"
LoadModule php5_module modules/php5apache2_2.dll
<IfModule php5_module>
<FilesMatch "\.php$">
SetHandler application/x-httpd-php
%WindowsDir%\Microsoft.NET\Framework\vx.y.zzzz\
aspnet_regiis.exe -i
@joneff
joneff / gist:1040129
Created June 22, 2011 13:54
js shorthands
var flag = !!document.something.testFeature
// e.g.
var canvasIsSupported = !!document.createElement("canvas").getContext
// if short hand
canvasIsSuppoted && doSomething()
// means
if (canvasIsSupported)
doSomething
@joneff
joneff / gist:1362051
Created November 13, 2011 12:17
make usb like a hard drive
diskpart
list disk
select DISK_NAME
clean
create partition primary
active
format fs=ntfs
assign
exit