Skip to content

Instantly share code, notes, and snippets.

View maxlee's full-sized avatar

Max maxlee

  • Guangzhou China
  • 08:57 (UTC +08:00)
View GitHub Profile
@maxlee
maxlee / ralph-clarify.md
Created January 5, 2026 04:44 — forked from kgalang/ralph-clarify.md
/ralph-clarify claude code command
Error in user YAML: (<unknown>): did not find expected key while parsing a block mapping at line 1 column 1
---
description: Comprehensive requirements discovery via iterative questioning
argument-hint: "topic to clarify" [--max-iterations N]
---

Ralph Clarify: Iterative Discovery Loop

Use the Ralph loop to exhaustively gather requirements through structured questioning. The loop pressure overrides the natural tendency to stop asking after 3-5 questions.

Parse Arguments

@maxlee
maxlee / HTML-tags.md
Created December 17, 2013 12:36 — forked from yisibl/HTML-tags.md

常用的 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 -->
if (typeof (AC) === "undefined") {
AC = {}
}
AC.ImageReplacer = Class.create({
_defaultOptions: {
listenToSwapView: true,
filenameRegex: /(.*)(\.[a-z]{3}($|#.*|\?.*))/i,
filenameInsert: "_☃x",
ignoreCheck: /(^http:\/\/movies\.apple\.com\/|\/105\/|\/global\/elements\/quicktime\/|_(([2-9]|[1-9][0-9]+)x|nohires)(\.[a-z]{3})($|#.*|\?.*))/i,
attribute: "data-hires",
function setHomepage() {
if (document.all) {
document.body.style.behavior = 'url(#default#homepage)';
document.body.setHomePage(window.location.href);
} else if (window.sidebar) {
if (window.netscape) {
try {
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
} catch (e) {
alert("该操作被浏览器拒绝,如果想启用该功能,
var detectZoom = function(){
var ratio = 0,
screen = window.screen,
ua = navigator.userAgent.toLowerCase();
if( ~ua.indexOf('firefox') ){
if( window.devicePixelRatio !== undefined ){
ratio = window.devicePixelRatio;
}
}
Array.prototype.unique = function(){
var newArray = [],
temp = {};
for(var i = 0; i < this.length; i++){
temp[typeof(this[i])+this[i]] = this[i];
}
for(var j in temp){
newArray.push(temp[j]);
}
return newArray;
<meta name="msapplication-TileColor" content="#2b86ec">
<meta name="msapplication-TileImage" content="windows-touch-icon-144x144.png">
<link rel="shortcut icon" sizes="196x196" href="android-touch-icon-196x196.png">
<link rel="shortcut icon" sizes="128x128" href="android-touch-icon-128x128.png">
<!-- iPad Retina running iOS ≥ 7: -->
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="apple-touch-icon-152x152-precomposed.png">
<!-- iPad Retina running iOS ≤ 6: -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="apple-touch-icon-144x144-precomposed.png">
<!-- iPhone Retina running iOS ≥ 7: -->
<link rel="apple-touch-icon-precomposed" sizes="120x120" href="apple-touch-icon-120x120-precomposed.png">
<!-- iPhone Retina running iOS ≤ 6: -->
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="apple-touch-icon-114x114-precomposed.png">
<!-- iPad mini and iPad G1/G2 running iOS ≥ 7: -->
<link rel="apple-touch-icon-precomposed" sizes="76x76" href="apple-touch-icon-76x76-precomposed.png">
var a = [10111,1101,111];
a.sort()
// [10111, 1101, 111]
function f(a,b){
return a-b;
}
a.sort(f)
// [111, 1101, 10111]