Skip to content

Instantly share code, notes, and snippets.

@sofish
sofish / ciao.js
Created October 27, 2014 13:54
ciao.js
$.fn.ciao = function() {
console.log('没事爱瞎bb');
return this;
};
// 这样执行
$().ciao().ciao().ciao();
@yisibl
yisibl / HTML-tags.md
Last active September 15, 2024 14:09
常用的 HTML 头部标签

常用的 HTML 头部标签

详细介绍参见原文:yisibl/blog#1

<!DOCTYPE html> <!-- 使用 HTML5 doctype,不区分大小写 -->
<html lang="zh-cmn-Hans"> <!-- 更加标准的 lang 属性写法 http://zhi.hu/XyIa -->
<head>
    <meta charset='utf-8'> <!-- 声明文档使用的字符编码 -->
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> <!-- 优先使用 IE 最新版本和 Chrome -->
@potch
potch / proxies_are_magic.html
Created December 9, 2013 22:22
Why can't I have Proxy yet??
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Why can't I have Proxy yet??</title>
</head>
<body>
<div id="item">
<h1 class="name">name goes here</h1>
@tg123
tg123 / README.md
Created November 9, 2013 02:32
自动订餐脚本 :) 现在刷失效了 开放出来
@hydra35
hydra35 / nginx.conf
Last active May 14, 2021 03:51
to gray, for Ya'An, Si Chuan earthquake
# 1. Make sure you have nginx sub module compiled in
# nginx -V 2>&1 | grep --color=always '\-\-with\-http_sub_module'
# 2. add two directives below at HTTP level
# nginx.conf
http {
# ......
sub_filter '</head>' '<style type="text/css">html{ filter: progid:DXImageTransform.Microsoft.BasicImage(grayscale=1); -webkit-filter: grayscale(100%); filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#grayscale"); /* Firefox 10+, Firefox on Android */
@fxsjy
fxsjy / gist:3550053
Created August 31, 2012 08:00
Bakup Weibo to Disk
package main
import (
"net/http"
"net/url"
"log"
"io/ioutil"
"regexp"
"fmt"
//"net/http/httputil"