Skip to content

Instantly share code, notes, and snippets.

View zhenyanghua's full-sized avatar
🐢
I may be slow to respond.

Zhenyang Hua zhenyanghua

🐢
I may be slow to respond.
View GitHub Profile
;(function(exports) {
// export the class if we are in a Node-like system.
if (typeof module === 'object' && module.exports === exports)
exports = module.exports = SemVer;
// The debug function is excluded entirely from the minified version.
// Note: this is the semver.org version of the spec that it implements
// Not necessarily the package version of this code.
@zhenyanghua
zhenyanghua / semver.js
Last active January 19, 2021 00:23
semver browser port
window.SemVer = (function () {
'use strict';
function createCommonjsModule(fn) {
var module = { exports: {} };
return fn(module, module.exports), module.exports;
}
// Note: this is the semver.org version of the spec that it implements
// Not necessarily the package version of this code.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
@zhenyanghua
zhenyanghua / conf.lua
Created August 6, 2021 00:47
Playground - Life
function love.conf(t)
t.window.title = "life"
t.window.width = 350
t.window.height = 600
end
@zhenyanghua
zhenyanghua / main.lua
Last active August 10, 2021 00:53
Eight queens puzzle
--[[
List all solutions that eight queens on the chess board can't attach each other
example output:
x - - - - - - -
- - - - x - - -
- - - - - - - x
- - - - - x - -
- - x - - - - -
- - - - - - x -