Skip to content

Instantly share code, notes, and snippets.

View gnosis23's full-sized avatar
🏀
have fun

bhwang gnosis23

🏀
have fun
View GitHub Profile
@gnosis23
gnosis23 / a.js
Last active March 26, 2021 09:15
simple webpack bundle.js example
export default function() {
console.log("hello aaa");
}
@gnosis23
gnosis23 / .babelrc
Last active August 18, 2019 14:11
Webpack React App
{
"presets": ["@babel/preset-env", "@babel/preset-react"]
}
@gnosis23
gnosis23 / lib.ts
Created August 11, 2019 13:23
fiber demo
// ============================================================================
// types
// ============================================================================
declare var requestIdleCallback: any;
enum FiberType {
HOST_ROOT,
HOST_COMPONENT,
CLASS_COMPONENT,
}
@gnosis23
gnosis23 / App.js
Created July 18, 2019 14:37
react test
import React from 'react';
function Todo(props) {
return (
<div>
<h2>{props.name}</h2>
</div>
)
}
@gnosis23
gnosis23 / index.html
Created July 7, 2019 13:54
rxjs starter
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<style>
body { background: #ececec; }
@gnosis23
gnosis23 / echoClient.js
Last active July 3, 2019 14:47
networks
const net = require('net');
const readline = require('readline');
const client = net.connect({port: 8124}, function () {
console.log('client connected');
});
client.on('end', function () {
console.log('client disconnected');
});
@gnosis23
gnosis23 / index.html
Created June 18, 2019 13:43
WebSocket demo
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<h1>Hello world</h1>
@gnosis23
gnosis23 / app.js
Last active May 12, 2019 15:05
归档浏览器的API
let names = Object.getOwnPropertyNames(window);
// JS 对象
let BasicJSObjects = [
"BigInt",
"BigInt64Array",
"BigUint64Array",
"Infinity",
"NaN",
"eval",
@gnosis23
gnosis23 / GreatTable.js
Created August 9, 2018 15:14
React Table
import React, {Fragment} from 'react';
import {Row, Col, Table, Button, Checkbox, Dropdown, Menu} from 'antd';
export default class GreatTable extends React.Component {
state = {
visible: false,
columns: [],
};
@gnosis23
gnosis23 / package.json
Created April 16, 2017 08:08
typescript boilerplate
{
"dependencies": {
"@types/jquery": "^2.0.41",
"@types/lodash": "^4.14.62",
"jquery": "^3.2.1",
"lodash": "^4.17.4",
"ts-loader": "^2.0.3",
"typescript": "^2.2.2",
"webpack": "^2.4.1"
},