This file contains hidden or 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 ruby | |
require 'zlib' | |
class RvParser | |
attr_accessor :type | |
attr_reader :target | |
def initialize(target) | |
@target = target | |
@type = isRvdata? ? 'unpack' : isExport? ? 'pack' : 'other' |
This file contains hidden or 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
tinymce.init({ | |
auto_focus: "content", //焦点ID | |
directionality: 'ltr', // ltr 文本流从左到右 rtl从右到左,默认ltr | |
browser_spellcheck: true, // 使用浏览器拼写检查 默认false | |
language_url: '/languages/fi.js', // 编辑器语言地址 | |
nowrap: true, // 编辑器内容禁止换行,默认为false |
This file contains hidden or 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 () { | |
'use strict'; | |
/** | |
* 读取文件返回数据 | |
* | |
* @ param path |
This file contains hidden or 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 () { | |
'use strict'; | |
/** | |
* init app | |
*/ | |
var app = angular.module('inde-system', ['ngRoute', 'pascalprecht.translate', 'ngAnimate']); | |
/** | |
* expose provide & configure |
This file contains hidden or 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
module.exports = (function () { | |
var fs = require('fs'), | |
tplReplace, | |
stateTpl = " .state('{{stateName}}', {url: '/{{stateRoute}}',templateUrl: 'tpl/{{stateFile}}'})"; | |
tplReplace = function (template, data) { | |
return template.replace(/\{\{(\w+)\}\}/g, function () { | |
return data[arguments[1]]; | |
}); | |
}; |
This file contains hidden or 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
@mixin linear-gradient($direction, $color-stop1, $color-stop2) | |
background-image: linear-gradient($direction, $color-stop1, $color-stop2) | |
background-image: -webkit-linear-gradient($direction, $color-stop1, $color-stop2) | |
background-image: -moz-linear-gradient($direction, $color-stop1, $color-stop2) | |
background-image: -o-linear-gradient($direction, $color-stop1, $color-stop2) | |
@mixin keyframes($animationName) | |
@-webkit-keyframes #{$animationName} | |
@content | |
@-moz-keyframes #{$animationName} |
This file contains hidden or 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
/** | |
* Fire an event handler to the specified node. Event handlers can detect that the event was fired programatically | |
* by testing for a 'synthetic=true' property on the event object | |
* @param {HTMLNode} node The node to fire the event handler on. | |
* @param {String} eventName The name of the event without the "on" (e.g., "focus") | |
*/ | |
function fireEvent(node, eventName) { | |
// Make sure we use the ownerDocument from the provided node to avoid cross-window problems | |
var doc; | |
if (node.ownerDocument) { |
This file contains hidden or 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> | |
<title></title> | |
</head> | |
<body> | |
<div id="count" style="font-size:2em;font-weight=bold;"></div> | |
</body> | |
<script> |
This file contains hidden or 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
paste = (e) => { | |
var file, remoteImages; | |
if (typeof e.clipboardData.types === 'undefined' || e.clipboardData.types.length === 0 || e.clipboardData.types[0] !== 'Files') { | |
return; | |
} | |
file = e.clipboardData.items[0].getAsFile(); | |
render(file); | |
e.stopPropagation(); |
This file contains hidden or 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
/** | |
* 一个异步生成器的简单函数实现 | |
* 演示参照下方exec | |
*/ | |
var async = function (makeGenerator) { | |
return function () { | |
var generator = makeGenerator(); | |
var continuer = function (result, value) { | |
if (result && result.done) { | |
return; |
OlderNewer