Skip to content

Instantly share code, notes, and snippets.

View gu-fan's full-sized avatar
🏠
Working from home

Rykk gu-fan

🏠
Working from home
View GitHub Profile
@gu-fan
gu-fan / n_sum.js
Last active October 17, 2019 16:51
interview_question
/* 问题:
* n-sum subset
*
* 在一个集合中,寻找一个由n个元素组成的子集,其和等于target
*
*/
function randomArray(n) {
let data = Array(n)
.fill()
.map(e=>Math.round(Math.random() * 2 * n))
<template>
<div >
child: {{pass_string}}
<textarea
v-model="pass_string"
@input="onChange"
style="background:red;"
></textarea>
</div>
</template>
@gu-fan
gu-fan / default
Last active September 26, 2018 13:00
nginx default
server {
listen 80 default_server;
listen [::]:80 default_server;
root /home/ubuntu/html;
# Add index.php to the list if you are using PHP
index index.html index.htm index.nginx-debian.html;
@gu-fan
gu-fan / test_install
Last active December 5, 2018 17:04
TEST_SERVER
sudo apt-get update
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs
sudo apt-get install -y build-essential
sudo apt-get install -y nginx
sudo apt-get install -y p7zip-full
sudo npm install -g yarn
sudo yarn global add pm2
@gu-fan
gu-fan / china.js
Last active September 5, 2023 09:43
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['exports', 'echarts'], factory);
} else if (typeof exports === 'object' && typeof exports.nodeName !== 'string') {
// CommonJS
factory(exports, require('echarts'));
} else {
// Browser globals
factory({}, root.echarts);
@gu-fan
gu-fan / test.html
Last active September 10, 2017 08:19
<!DOCTYPE html>
<html>
<head>
<title>电力数据</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,
initial-scale=1, maximum-scale=1, user-scalable=0"/>
<script src="./echarts.min.js"></script>
<script src="./china.js"></script>
@gu-fan
gu-fan / china.json
Created September 10, 2017 06:11
--
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
{"type":"FeatureCollection","features":[{"id":"710000","type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[["@@°Ü¯Û"],["@@ƛĴÕƊÉɼģºðʀ\\ƎsÆNŌÔĚäœnÜƤɊĂǀĆĴžĤNJŨxĚĮǂƺòƌ‚–âÔ®ĮXŦţƸZûЋƕƑGđ¨ĭMó·ęcëƝɉlÝƯֹÅŃ^Ó·śŃNjƏďíåɛGɉ™¿@ăƑŽ¥ĘWǬÏĶŁâ"],["@@\\p|WoYG¿¥I†j@¢"],["@@…¡‰@ˆV^RqˆBbAŒnTXeRz¤Lž«³I"],["@@ÆEE—„kWqë @œ"],["@@fced"]],"encodeOffsets":[[[122886,24033]],[[123335,22980]],[[122375,24193]],[[122518,24117]],[[124427,22618]],[[124862,26043]]]},"properties":{"cp":[121.509062,25.044332],"name":"台湾","childNum":6}},{"id":"130000","type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[["@@o~†Z]‚ªr‰ºc_ħ²G¼s`jΟnüsœłNX_“M`ǽÓnUK…Ĝēs¤­©yrý§uģŒc†JŠ›e"],["@@U`Ts¿m‚"],["@@oºƋÄd–eVŽDJj£€J|Ådz•Ft~žKŨ¸IÆv|”‡¢r}膎onb˜}`RÎÄn°ÒdÞ²„^®’lnÐèĄlðӜ×]ªÆ}LiĂ±Ö`^°Ç¶p®đDcœŋ`–ZÔ’¶êqvFƚ†N®ĆTH®¦O’¾ŠIbÐã´BĐɢŴÆíȦp–ĐÞXR€·nndOž¤’OÀĈƒ­Qg˜µFo|gȒęSWb©osx|hYh•gŃfmÖĩnº€T̒Sp›¢dYĤ¶UĈjl’ǐpäìë|³kÛfw²Xjz~ÂqbTŠÑ„ěŨ@|oM‡’zv¢ZrÃVw¬ŧĖ¸fŒ°ÐT€ªqŽs{Sž¯r æÝlNd®²Ğ džiGʂJ™¼lr}~K¨ŸƐÌWö€™ÆŠzRš¤lêmĞL΄’@¡|q]SvK€ÑcwpÏρ†ĿćènĪWlĄkT
@gu-fan
gu-fan / china.js
Created September 10, 2017 05:15
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['exports', 'echarts'], factory);
} else if (typeof exports === 'object' && typeof exports.nodeName !== 'string') {
// CommonJS
factory(exports, require('echarts'));
} else {
// Browser globals
factory({}, root.echarts);
@gu-fan
gu-fan / html
Last active September 10, 2017 05:07
test
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="https://cdn.bootcss.com/echarts/3.7.1/echarts.min.js"></script>
<script src="http://echarts.baidu.com/asset/map/js/china.js"></script>
</head>
<style>
.tp{
font-size: 20px;