Skip to content

Instantly share code, notes, and snippets.

Avatar

Rex Zeng RexSkz

View GitHub Profile
@RexSkz
RexSkz / roses-are-red.js
Created Aug 16, 2019 — forked from mutoo/roses-are-red.js
Roses are read, violets are blue. Unexpected token { at line 32.
View roses-are-red.js
// inspired by https://twitter.com/nixcraft/status/1162020669242003456
console.log('Roses are red, violets are blue.');
View keybase.md

Keybase proof

I hereby claim:

  • I am rexskz on github.
  • I am skywalker_z (https://keybase.io/skywalker_z) on keybase.
  • I have a public key ASA3HzI8Fv8-H0PEIMAp_ecppZTq4VD45vHHrO5aJt_dbgo

To claim this, I am signing this object:

@RexSkz
RexSkz / prism-javascript.js
Last active Sep 9, 2018
JavaScript file highlight for Prism.js (support function arguments)
View prism-javascript.js
// current
Prism.languages.javascript = Prism.languages.extend('clike', {
'keyword': /\b(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)\b/,
'number': /\b(?:0[xX][\dA-Fa-f]+|0[bB][01]+|0[oO][0-7]+|NaN|Infinity)\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee][+-]?\d+)?/,
// Allow for all non-ASCII characters (See http://stackoverflow.com/a/2008444)
'function': /[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*\()/i,
'operator': /-[-=]?|\+[+=]?|!=?=?|<<?=?|>>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/
});
@RexSkz
RexSkz / el-option-test.html
Last active Aug 16, 2017
Too many events are emited when `el-select`'s option changed
View el-option-test.html
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="robots" content="noindex, nofollow">
<meta name="googlebot" content="noindex, nofollow">
<script type="text/javascript" src="https://fiddle.jshell.net/js/babel/babel.js"></script>
<script type="text/javascript" src="https://fiddle.jshell.net/js/lib/dummy.js"></script>
<link rel="stylesheet" type="text/css" href="https://fiddle.jshell.net/css/result-light.css">
<style type="text/css">
@RexSkz
RexSkz / CodeMirror-github.sass
Created May 25, 2017 — forked from k2052/CodeMirror-github.sass
Github Like Codemirror theme
View CodeMirror-github.sass
.CodeMirror.cm-s-github
.CodeMirror-activeline-background
background: rgba(255, 255, 255, 0.031)
.CodeMirror-gutters
background: #f0f0f0x
border-right: 1px solid #4D4D4D
box-shadow: 0 10px 20px black
.CodeMirror-linenumber