Skip to content

Instantly share code, notes, and snippets.

View switer's full-sized avatar
😬
Smiling service

guankaishe switer

😬
Smiling service
View GitHub Profile
@switer
switer / http-and-https-proxy.js
Created May 20, 2016 06:44 — forked from bnoordhuis/http-and-https-proxy.js
A node.js proxy that accepts HTTP and HTTPS traffic on the same port.
var fs = require('fs');
var net = require('net');
var http = require('http');
var https = require('https');
var httpAddress = '/path/to/http.sock';
var httpsAddress = '/path/to/https.sock';
fs.unlinkSync(httpAddress);
fs.unlinkSync(httpsAddress);
@switer
switer / clouda-web-component-parser
Last active August 29, 2015 14:04
clouda web component parser
define('ui-importer',[ 'utils', 'loader', 'event', 'tag-parser' ], function(utils, loader, Event, tagParser) {
'use strict';
var importHistory = {};
/**
* Import ui resources and cache them
*/
function UImporter(name, opts) {
@switer
switer / octotree-dark-theme
Last active August 29, 2015 14:04
octotree dark theme
/*octotree*/
.octotree_views {background:rgba(0,0,0,.9)}
/*clicked*/
.octotree_views .octotree_treeview .jstree-default .jstree-wholerow-clicked {background:rgba(255,255,255,.2)}
/*hovered*/
.octotree_views .octotree_treeview .jstree-default .jstree-wholerow-hovered {background:rgba(255,255,255,.3)}
/*header*/
.octotree_views .octotree_treeview .octotree_view_header {background: linear-gradient(to bottom, #282828, #181818) !important;
border-color: #333 !important;}
/*container*/
var title = '龙飘飘《康定情歌》(KTV)',
tagStr = '视频,龙飘飘,康定情歌,KTV,康定情歌',
titleRegexpStr, // 去除标题匹配的正则字符串,用于成“去除标题匹配的正则”
regexp, // 去除标题匹配的正则
tags; // 得到的标签结果数组
titleRegexpStr = title
.replace(/[^\u4e00-\u9fa5a-zA-Z0-9]+/g, '')//去掉标题的符号
.match(/./g) // 切割每个字
.join('[^\\u4e00-\\u9fa5a-zA-Z0-9]*'); // 生产字与符号的通配正则(字符串)
//Chrome上能用的
["Image", "Audio", "MediaController", "TrackEvent", "Option", "PopStateEvent", "HashChangeEvent", "PageTransitionEvent", "Event", "CustomEvent", "MutationObserver", "Document", "FormData", "XMLHttpRequest", "FormData", "IDBVersionChangeEvent", "StorageEvent", "RTCSessionDescription", "RTCIceCandidate", "MediaStreamEvent", "Notification", "Blob", "FileReader", "ErrorEvent", "Worker", "SharedWorker", "TransitionEvent"]
//标准里有但是还不能用的
["RelatedEvent", "DragEvent", "AnonXMLHttpRequest", "RTCPeerConnection", "RTCPeerConnectionIceEvent", "DataChannelEvent", "ClipboardEvent", "FileReaderSync", "BlobBuilder", "FileSaver", "ParGroup", "SeqGroup", "Animation", "PseudoElementReference", "KeyframeAnimationEffect", "PathAnimationEffect", "TimingEvent", "AnimationEvent"]
function HTMLLexicalParser(){
function emitToken(token){
console.log(token);
}
function error(){
console.log("error");
}
@switer
switer / link
Created May 1, 2013 15:36
An presentation editor and player power by impress.js
@switer
switer / ad
Created April 16, 2013 07:40
An impress.js slider GUI editor. [Link](http://switer.github.io/imper)
An impress.js slider GUI editor.
[Link](http://switer.github.io/imper)

An ongoing project to catalogue all of these sneaky, hidden, bleeding edge selectors as I prepare my JSConf EU 2012 talk.

Everything is broken up by tag, but within each the selectors aren't particularly ordered.

I have not tested/verified all of these. Have I missed some or got it wrong? Let me know. - A

A friendly reminder that you may need to set this property on your target/selected element to get the styling results you want:

-webkit-appearance:none;