Skip to content

Instantly share code, notes, and snippets.

View sofish's full-sized avatar
🚀
still hiring creatives

小鱼 sofish

🚀
still hiring creatives
View GitHub Profile
@sofish
sofish / base.css
Created August 4, 2010 01:05
CSS Reset and base Func for your web project
@charset "utf-8";
/*
@名称: base
@功能: 重设浏览器默认样式
@例子: null
*/
/* 防止用户自定义背景颜色对网页的影响 */
html{
@sofish
sofish / jQuery.ajax.html
Created August 4, 2010 18:48
Request Del.icio.us Item Using jQuery.AJAX
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Request Del.icio.us Item Using jQuery.AJAX</title>
<style type="text/css">
body{width:600px;margin:30px auto;font:13px georgia;}
ul{margin-left:1.3em;;padding:0;line-height:1.8;color:#aaa;}
ul a{color:#07f;}
<script src="http://www.flickr.com/badge_code_v2.gne?count=1&amp;display=latest&amp;size=m&amp;layout=x&amp;source=all_tag&amp;tag=love" type="text/javascript"></script>
<div>
<p><a href="ed2k://|file|%5BYYDM%5D%5B%E7%94%9C%E7%94%9C%E7%A7%81%E6%88%BF%E7%8C%AB2%5D%5BChi%27s_Sweet_Home%5D%5BSP01%5D%5B960x650%5D.rmvb|13471444|172d3d568d3ee2d096a7de1dc8be4c53|h=3hmeoz4c5yftoesipcjop3lwjgawwtki|/">ed2k://|file|%5BYYDM%5D%5B%E7%94%9C%E7%94%9C%E7%A7%81%E6%88%BF%E7%8C%AB2%5D%5BChi%27s_Sweet_Home%5D%5BSP01%5D%5B960x650%5D.rmvb|13471444|172d3d568d3ee2d096a7de1dc8be4c53|h=3hmeoz4c5yftoesipcjop3lwjgawwtki|/</a></p>
<p><a href="ed2k://|file|%5BYYDM%5D%5B%E7%94%9C%E7%94%9C%E7%A7%81%E6%88%BF%E7%8C%AB2%5D%5BChi%27s_Sweet_Home%5D%5BSP02%5D%5B960x650%5D.rmvb|13222860|2bb3619ae2b34bd745fe301872cd35e4|h=53b2li3mbpij5mldc6fj6537dwo4jley|/">ed2k://|file|%5BYYDM%5D%5B%E7%94%9C%E7%94%9C%E7%A7%81%E6%88%BF%E7%8C%AB2%5D%5BChi%27s_Sweet_Home%5D%5BSP02%5D%5B960x650%5D.rmvb|13222860|2bb3619ae2b34bd745fe301872cd35e4|h=53b2li3mbpij5mldc6fj6537dwo4jley|/</a></p>
<p><a href="ed2k://|file|%5BYYDM%5D%5B%E7%94%9C%E7%94%9C%E7%A7%81%E6%88%BF%E7%8C%AB2%5D%5BChi%27s_Sweet_Home%5D%5BSP03%5D%5B960x650%5D.rmvb|13
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>LocalStorage</title>
<style type="text/css">
body{margin:30px 0 0 100px;}
body, input, textarea{font-family:Georgia;}
strong{color:#08c;}
</style>
var PIE = window['PIE'];
if( !PIE ) {
PIE = window['PIE'] = {
CSS_PREFIX: '-pie-',
STYLE_PREFIX: 'Pie',
CLASS_PREFIX: 'pie_'
};
// Detect IE6
// written by Dean Edwards, 2005
// with input from Tino Zijdel, Matthias Miller, Diego Perini
// http://dean.edwards.name/weblog/2005/10/add-event/
function addEvent(element, type, handler) {
if (element.addEventListener) {
element.addEventListener(type, handler, false);
} else {
// assign each event handler a unique ID
// header collapse
var header = $('h3', '.hv-sqs');
header.each(function(i){
var t = $(this), ul = t.next('.hv-list-c'), bg = t.css('background-image');
t.toggle(function(){
ul.slideUp('fast',function(){
t.addClass('hv-header-up').css('background-image','none');
});
if(i==0) $('.hv-slist-s','#hv-allq').hide();
},function(){
@sofish
sofish / css
Created September 26, 2010 11:04
article, aside, canvas, details, figcaption, figure,
footer, header, hgroup, menu, nav, section, summary,
time, mark, audio, video{padding:0;margin:0}
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {display:block;}
" Vim colour scheme
" Maintainer: Georg Dahn
" Last Change: 26 April 2006
" Version: 1.6
"
" This color scheme has both light and dark styles with harmonic colors
" easy to distinguish. Terminals are not supported, therefore you should
" only try it if you use the GUI version of Vim.
"
" You can choose the style by adding one of the following lines to your