Skip to content

Instantly share code, notes, and snippets.

View kunkun12's full-sized avatar

kunkun kunkun12

View GitHub Profile
@kunkun12
kunkun12 / gist:457fd6cb4b3b08ee23425db1d2e67fb3
Created March 29, 2019 03:07 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@kunkun12
kunkun12 / gist:f5b8a6c3bfa1132d4de3e933ae7e1d84
Created March 29, 2019 03:07 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@kunkun12
kunkun12 / app.html
Created November 20, 2018 07:16 — forked from jdanyow/app.html
AST Visualizer
<template>
<require from="./expression"></require>
<button class="button-outline button-small"
repeat.for="example of examples"
click.delegate="expressionString = example.expression">
${example.name}
</button>
<label class="expression-input">
@kunkun12
kunkun12 / httpd-vhost.conf
Last active August 29, 2015 14:16
apche配置参考
NameVirtualHost *:80
<VirtualHost *:8091>
DocumentRoot "/Users/adsage/work/basic/web"
ServerName localhost
<Directory />
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
@kunkun12
kunkun12 / Gruntfile.js
Last active August 29, 2015 14:14
grunt-live-reload config
module.exports = function(grunt){
require('load-grunt-tasks')(grunt); //加载所有的任务
grunt.initConfig({
connect: {
options: {
port: 80,
hostname: 'localhost', //默认就是这个值,可配置为本机某个 IP,localhost 或域名
livereload: 35729 //声明给 watch 监听的端口
},
.flex {
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
}
.flex.flex--reverse {
-webkit-box-orient: horizontal;
@kunkun12
kunkun12 / getTextBounds
Last active August 29, 2015 14:13
获取文本的宽度
* @name getTextBounds
* @description
* Get a rect representing the bounds of the given textNode.
* @param {DOMElement} textNode The textNode to find the bounds of.
* @returns {object} An object representing the bounds of the node. Properties:
* - `{number}` `left` The left position of the textNode.
* - `{number}` `right` The right position of the textNode.
* - `{number}` `top` The top position of the textNode.
* - `{number}` `bottom` The bottom position of the textNode.
* - `{number}` `width` The width of the textNode.
@kunkun12
kunkun12 / gist:e5a7728c77d6b029d7f4
Created January 7, 2015 15:59
判断元素是否在视口中
function(element, options) {
var $element = $(element);
var visible = !!($element.width() || $element.height()) &&
$element.css('display') !== 'none';
if (!visible) {
return false;
}
var windowLeft = $win.scrollLeft();
@kunkun12
kunkun12 / 禁用console
Created October 22, 2014 15:20
禁用console
(function() {
try {
var $_console$$ = console;
Object.defineProperty(window, "console", {
get: function() {
if ($_console$$._commandLineAPI)
throw "出于安全考虑 您不能这样的操作";
return $_console$$
},
set: function($val$$) {
<div class='bt bottombt'>
好好学习
</div>
<div class='bt topbt'>
<div style='width:200px'>好好学习</div>
</div>