Skip to content

Instantly share code, notes, and snippets.

View GeekSnail's full-sized avatar
🎯
Focusing

GeekSnail

🎯
Focusing
View GitHub Profile
@GeekSnail
GeekSnail / resume.json
Last active September 19, 2022 06:53 — forked from thomasdavis/resume.json
{
"meta": {
"theme": "elegant"
},
"basics": {
"name": "李明泽",
"label": "Java后端开发",
"image": "http://www.bluebells.ga/face_white.jpg",
"summary": "我曾在初创公司做过web前端开发,目前热衷于Java后端开发。",
"website": "http://bluebells.ga",
import React, { createContext, useContext, useReducer } from "react";
export const StateContext = createContext();
export const StateProvider = ({ reducer, initialState, children }) => (
<StateContext.Provider value={useReducer(reducer, initialState)}>
{children}
</StateContext.Provider>
);
export const useStore = () => useContext(StateContext);
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<script type="text/javascript" src="https://api.map.baidu.com/api?v=2.0&ak=4IU3oIAMpZhfWZsMu7xzqBBAf6vMHcoa">
</script>
<title>
关键字输入提示词条
</title>
@GeekSnail
GeekSnail / App.vue
Created March 29, 2019 18:35
vuetify default
<template>
<v-app>
<v-toolbar app>
<v-toolbar-title class="headline text-uppercase">
<span>Vuetify</span>
<span class="font-weight-light">MATERIAL DESIGN</span>
</v-toolbar-title>
<v-spacer></v-spacer>
<v-btn
flat
Function.prototype.before = function (beforefn) {
var _self = this; //保存原函数引用
console.log('call before', this)
return function () { //返回包含了原函数和新函数的"代理函数"
console.log('call before, return', this, 'arg', arguments)
beforefn.apply(this, arguments); //执行新函数,修正this
console.log('call before return return', this, 'arg ',arguments, '_self ', _self)
return _self.apply(this, arguments); //执行原函数
}
};