This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function _exec_with | |
set -l shell $argv[1] | |
set -l file $argv[2] | |
set -l code $argv[3] | |
set -l source | |
switch "$shell" | |
case bash zsh ksh | |
set source . | |
case '*' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript | |
Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
name:"HTML5", | |
uri:"http://www.w3.org/TR/html5/single-page.html", | |
category:"markup" | |
}, | |
{ | |
name:"HTML 5.1", | |
uri:"http://www.w3.org/TR/html51/single-page.html", | |
category:"markup" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"spec name": "CSS Animations", | |
"uri": "http://www.w3.org/TR/css3-animations", | |
"category": "css-property", | |
"Name": "animation-name", | |
"Value": "<single-animation-name> [\n ‘,’ <single-animation-name> ]*", | |
"Initial": "‘none’", | |
"Applies To": "all elements, ::before and ::after pseudo-elements", | |
"Inherited": "no", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Defines prefixed versions of the | |
// transitionEnd event handler | |
transitionFinishedEvents = { | |
'WebkitTransition' : 'webkitTransitionEnd', | |
'MozTransition' : 'transitionend', | |
'OTransition' : 'oTransitionEnd', | |
'msTransition' : 'msTransitionEnd', | |
'transition' : 'transitionEnd' | |
}; | |
// Define the correct transition event for this UA |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function randomColor(){ | |
return "rgb("+Math.floor(Math.random()*255)+","+Math.floor(Math.random()*255)+","+Math.floor(Math.random()*255)+")"; | |
} | |
function showBoxes(window) { | |
var rects = []; | |
function getRects(node){ | |
var range = window.document.createRange(); | |
range.setStartBefore(node); | |
range.setEndAfter(node); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import subprocess | |
import re | |
ntfs_pattern = re.compile(r'File System Personality: NTFS') | |
ntfs_device_node = re.compile(r'.*Device Node:.*') | |
device_dict = {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<!--允许全屏--> | |
<meta content="yes" name="apple-mobile-web-app-capable"/> | |
<meta content="yes" name="apple-touch-fullscreen"/> | |
<!--禁止电话号码和邮箱识别--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// If it's a relative path, we need to make it absolute, using the | |
// reader's location (not the active component's location). | |
if (!url.match(/^\//)) { | |
var link = document.createElement('a'); | |
link.setAttribute('href', url); | |
url = link.href; | |
delete(link); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset=utf-8 /> | |
<title>Hello</title> | |
<link rel="stylesheet" href="styles.css"> | |
</head> | |
<body> | |
Hello World | |
</body> |