Skip to content

Instantly share code, notes, and snippets.

View Lynn-cc's full-sized avatar
🙃
Is there any intersting ideas ?

Lynn Lynn-cc

🙃
Is there any intersting ideas ?
  • Shenzhen China
View GitHub Profile
@languanghao
languanghao / left-bar.vue
Created December 22, 2016 06:56
element ui menu with vue-router
<template>
<el-menu :router="true" :default-active="activeLink">
<template v-for="rule in $router.options.routes">
<el-submenu v-if="rule.children && rule.children.length > 0"
:index="rule.path"
>
<template slot="title"><i :class="rule.icon"></i>{{ rule.title }}</template>
<el-menu-item v-for="child in rule.children" :index="rule.path + '/' + child.path">{{ child.title }}</el-menu-item>
</el-submenu>
<el-menu-item v-else
@JerryC8080
JerryC8080 / RexChainesPhone.js
Created March 21, 2016 08:08
匹配中国电话号码的正则表达式
/**
电信
中国电信手机号码开头数字
2G/3G号段(CDMA2000网络)133、153、180、181、189
4G号段 177
联通
中国联通手机号码开头数字
Highcharts.Chart.prototype.callbacks.push(function(chart) {
var hasTouch = document.documentElement.ontouchstart !== undefined,
mouseTracker = chart.pointer,
container = chart.container,
mouseMove;
mouseMove = function (e) {
if (hasTouch) {
if (e && e.touches && e.touches.length > 1) {
mouseTracker.onContainerTouchMove(e);
@marco-martins
marco-martins / touch-tooltip-fix.js
Created June 26, 2012 10:31 — forked from slawekkolodziej/touch-tooltip-fix.js
Highcharts tracker now don't prevent default behavior (like scrolling on touch devices).
Highcharts.Chart.prototype.callbacks.push(function(chart) {
var hasTouch = hasTouch = document.documentElement.ontouchstart !== undefined,
mouseTracker = chart.tracker,
container = chart.container,
mouseMove;
mouseMove = function (e) {
// let the system handle multitouch operations like two finger scroll
// and pinching
if (e && e.touches && e.touches.length > 1) {
@ahgittin
ahgittin / jsonball.rb
Created February 23, 2012 21:57
a jekyll tag to parse json files and objects for use as maps subsequently
require 'json'
# JSON parser tag, creating map for use in jekyll markdown
# Alex.Heneveld @ Cloudsoft Corp (remove spaces and add the .com)
# Released under APL 2.0
# usage: {% jsonball varname from TYPE PARAM %}
#
# where TYPE is one of {data,var,file,page}, described below