GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • All gists
  • Back to GitHub
  • Sign in
  • Sign up
  • All gists 40
  • Forked 1
  • Terms
  • Privacy
  • Security
  • Status
  • Community
  • Docs
  • Contact

This view

  • Original page
  • New address

GeezerVison is showing gist.github.com — wintercn’s gists

Instantly share code, notes, and snippets.

View wintercn's full-sized avatar

Shaofei Cheng wintercn

9.3k followers · 30 following
  • China
  • https://space.bilibili.com/8538662
View GitHub Profile
    • Recently created
    • Least recently created
    • Recently updated
    • Least recently updated
  • 3 files
  • 0 forks
  • 0 comments
  • 0 stars
@wintercn
wintercn / README.md
Last active October 10, 2026 13:47
gradual-json:Vue 流式 JSON 示例(完整代码)

Vue 流式 JSON 示例

index.html 是完整可运行示例,包含 Vue 模板、样式、模拟异步输入、解析、停止与重播。未收到的字段留空;界面直接读取 reactive 宿主,未在解析完成后再复制结果。

运行

下载 index.html,在所在目录运行:

python3 -m http.server 8080 --bind 127.0.0.1
  • 7 files
  • 0 forks
  • 0 comments
  • 0 stars
@wintercn
wintercn / README.md
Last active October 5, 2026 09:29
Void 0.24.0 Vue Pages: browser Back loses scroll position after ordinary anchor document navigation

Vue Pages: browser Back loses the scroll position after document navigation

This standalone app has two server-rendered Vue pages. Page A contains 80 numbered rows, each with an ordinary link to Page B. The numbered rows make the scroll position visible.

Run

Use Node.js 24.21.0 or newer.

Download the gist as a ZIP and extract it into a new folder. Gist stores the files in a flat directory. Put the two Vue files in src/pages/, then install and start:

  • 1 file
  • 0 forks
  • 0 comments
  • 0 stars
@wintercn
wintercn / BinaryHashTree.js
Created March 27, 2025 08:52
class BinaryHashTree {
constructor() {
this.root = null;
this.depth = 0; // 记录树的当前深度
}
// 将数字转换为二进制字符串
toBinaryString(num) {
return (num >>> 0).toString(2);
}
  • 1 file
  • 0 forks
  • 0 comments
  • 0 stars
@wintercn
wintercn / gist:2103c62050327c2a62447681ae116a46
Created January 3, 2025 00:58
fibnacci.js
const fib = n => n === 0 ? [0, 1] :
n % 2 ? (([a, b]) => [b, a + b])(fib(n - 1)) :
(([a, b]) => [a * b + a * (b - a), a * a + b * b])(fib(n / 2));
Array(10).fill(0).map((v, n) => fib(n)[0])
  • 1 file
  • 0 forks
  • 0 comments
  • 0 stars
@wintercn
wintercn / primes.js
Last active August 25, 2023 09:30
JavaScript Primes
function* primes(){
let primes = [];
let i = 1;
outer:while(true) {
++ i;
for(let p of primes)
if(p % i === 0)
continue outer;
primes.push(i);
yield i;
  • 1 file
  • 0 forks
  • 0 comments
  • 1 star
@wintercn
wintercn / parseTree.html
Created May 12, 2021 11:30
<body>
<style>
.number {
color:purple;
}
.keyword {
color:blue;
}
.string {
color:red;
  • 2 files
  • 0 forks
  • 0 comments
  • 0 stars
@wintercn
wintercn / categoryTree.js
Last active May 3, 2020 17:00
JS Factory demo
const categories = [
{id:'animals', parent:null},
{id:'mammals', parent:'animals'},
{id:'cats', parent:'mammals'},
{id:'dogs', parent:'mammals'},
{id:'chihuahua', parent:'dogs'},
{id:'labrador', parent:'dogs'},
{id:'persian', parent:'cats'},
{id:'siamese', parent:'cats'},
]
  • 1 file
  • 0 forks
  • 0 comments
  • 0 stars
@wintercn
wintercn / reverseKGroupFromEnd.js
Created December 15, 2019 16:35
reverseKGroupFromEnd
/**
* Definition for singly-linked list.
* function ListNode(val) {
* this.val = val;
* this.next = null;
* }
*/
/**
* @param {ListNode} head
* @param {number} k
  • 1 file
  • 0 forks
  • 0 comments
  • 0 stars
@wintercn
wintercn / vue-map-editor.html
Last active November 27, 2019 16:17
<body style="margin:0;">
<div id="app" style="position:relative;width:100%;height:100%;">
</div>
<script src="https://cdn.jsdelivr.net/npm/vue"></script>
<script>
Vue.component('local-storage', {
props: ['value', 'key'],
template: `<div></div>`,
mounted(){
if(!localStorage[this.$props.key])
  • 1 file
  • 0 forks
  • 0 comments
  • 0 stars
@wintercn
wintercn / vue-local-storage.js
Created November 25, 2019 18:04
Vue.component('local-storage', {
props: ['value', 'key'],
template: `<div></div>`,
mounted(){
if(!localStorage[this.$props.key])
return;
var str = JSON.stringify(this.$props.value);
if(str != localStorage[this.$props.key])
this.$emit('input', JSON.parse(localStorage[this.$props.key]))
},
NewerOlder
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.