cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

            
              <article>
    <h1>BASH CHEAT SHEET</h1>
    <p>This file contains short tables of commonly used items in this shell.  In most cases the information applies to both the Bourne shell (sh) and the newer bash shell.</p>
    <p>Tests (for ifs and loops) are done with [ ] or with the test command.</p>

      <h2>Checking files:</h2>

      <pre class="language-bash"><code class="language-bash">
-r file    # Check if file is readable.
-w file    # Check if file is writable.
-x file    # Check if we have execute access to file.
-f file    # Check if file is an ordinary file (as opposed to a directory,
             # a device special file, etc.)
-s file    # Check if file has size greater than 0.
-d file    # Check if file is a directory.
-e file    # Check if file exists.  Is true even if file is a directory.
      </code></pre>

      <p>Example:</p>
      <pre class="language-bash"><code class="language-bash">
if [ -s file ]
then
such and such
fi
      </code></pre>

      <h2>Checking strings:</h2>
      <pre class="language-bash"><code class="language-bash">
s1 = s2     # Check if s1 equals s2.
s1 != s2    # Check if s1 is not equal to s2.
-z s1       # Check if s1 has size 0.
-n s1       # Check if s2 has nonzero size.
s1          # Check if s1 is not the empty string.

      </code></pre>

      <p>Example:</p>
      <pre class="language-bash"><code class="language-bash">
if [ $myvar = "hello" ]
then
  echo "We have a match"
fi
      </code></pre>


      <h2>Checking numbers:</h2>

      <p>Note that a shell variable could contain a string that represents a number.
      If you want to check the numerical value use one of the following:</p>

      <pre class="language-bash"><code class="language-bash">
n1 -eq n2     # Check to see if n1 equals n2.
n1 -ne n2     # Check to see if n1 is not equal to n2.
n1 -lt n2     # Check to see if n1 &lt; n2.
n1 -le n2     # Check to see if n1 &lt;= n2.
n1 -gt n2     # Check to see if n1 &gt; n2.
n1 -ge n2     # Check to see if n1 &gt;= n2.
      </code></pre>

      <p>Example:</p>

      <pre class="language-bash"><code class="language-bash">
if [ $# -gt 1 ]
then
  echo "ERROR: should have 0 or 1 command-line parameters"
fi
      </code></pre>

      <h2>Boolean operators:</h2>

      <pre class="language-bash"><code class="language-bash">
!     # not
-a    # and
-o    # or
      </code></pre>

      <p>Example:</p>
      <pre class="language-bash"><code class="language-bash">
if [ $num -lt 10 -o $num -gt 100 ]
then
  echo "Number $num is out of range"
elif [ ! -w $filename ]
then
  echo "Cannot write to $filename"
fi
      </code></pre>

      <p>Note that ifs can be nested.  For example:</p>

      <pre class="language-bash"><code class="language-bash">
if [ $myvar = "y" ]
then
  echo "Enter count of number of items"
  read num
  if [ $num -le 0 ]
  then
    echo "Invalid count of $num was given"
    else
    ... do whatever ...
  fi
fi
      </code></pre>

      <p>The above example also illustrates the use of read to read a string from the keyboard and place it into a shell variable.  Also note that most UNIX commands return a true (nonzero) or false (0) in the shell variable status to indicate whether they succeeded or not.  This return value can be checked.  At the command line echo $status.  In a shell script use something like this: </p>

      <pre class="language-bash"><code class="language-bash">
if grep -q shell bshellref
then
   echo "true"
else
   echo "false"
fi
      </code></pre>

      <p>Note that -q is the quiet version of grep.  It just checks whether it is true
      that the string shell occurs in the file bshellref.  It does not print the
      matching lines like grep would otherwise do.</p>

      <h2>I/O Redirection:</h2>

      <pre class="language-bash"><code class="language-bash">
pgm &gt; file    # Output of pgm is redirected to file.
pgm &lt; file    # Program pgm reads its input from file.
pgm &gt;&gt; file   # Output of pgm is appended to file.
pgm1 | pgm2   # Output of pgm1 is piped into pgm2 as the input to pgm2.
n &gt; file      # Output from stream with descriptor n redirected to file.
n &gt;&gt; file     # Output from stream with descriptor n appended to file.
n &gt;&amp; m        # Merge output from stream n with stream m.
n &lt;&amp; m        # Merge input from stream n with stream m.
&lt;&lt; tag        # Standard input comes from here through next tag at start of line.
      </code></pre>

      <p>Note that file descriptor 0 is normally standard input, 1 is standard output,
      and 2 is standard error output.</p>

      <h2>Shell Built-in Variables:</h2>

      <pre class="language-bash"><code class="language-bash">
$0            # Name of this shell script itself.
$1            # Value of first command line parameter (similarly $2, $3, etc)
$#            # In a shell script, the number of command line parameters.
$*            # All of the command line parameters.
$-            # Options given to the shell.
$?            # Return the exit status of the last command.
$$            # Process id of script (really id of the shell running the script)
      </code></pre>

      <h2>Pattern Matching:</h2>

      <pre class="language-bash"><code class="language-bash">
*             # Matches 0 or more characters.
?             # Matches 1 character.
[AaBbCc]      # Example: matches any 1 char from the list.
[^RGB]        # Example: matches any 1 char not in the list.
[a-g]         # Example: matches any 1 char from this range.
      </code></pre>

      <h2>Quoting:</h2>

      <pre class="language-bash"><code class="language-bash">
\c            # Take character c literally.
`cmd`         # Run cmd and replace it in the line of code with its output.
"whatever"    # Take whatever literally, after first interpreting $, `...`, \
'whatever'    # Take whatever absolutely literally.
      </code></pre>

      <h2>Example:</h2>

      <pre class="language-bash"><code class="language-bash">
match=`ls *.bak`       # Puts names of .bak files into shell variable match.
echo \*                # Echos * to screen, not all filename as in:  echo *
echo '$1$2hello'       # Writes literally $1$2hello on screen.
echo "$1$2hello"       # Writes value of parameters 1 and 2 and string hello.
      </code></pre>

      <h2>Grouping:</h2>

      <p>Parentheses may be used for grouping, but must be preceded by backslashes
      since parentheses normally have a different meaning to the shell (namely
      to run a command or commands in a subshell).  For example, you might use:</p>

      <pre class="language-bash"><code class="language-bash">
if test \( -r $file1 -a -r $file2 \) -o \( -r $1 -a -r $2 \)
then
   do whatever
fi
      </code></pre>

      <h2>Case statement:</h2>

      <p>Here is an example that looks for a match with one of the characters a, b, c.
      If $1 fails to match these, it always matches the * case.  A case statement
      can also use more advanced pattern matching.</p>

      <pre class="language-bash"><code class="language-bash">
case "$1" in
   a) cmd1 ;;
   b) cmd2 ;;
   c) cmd3 ;;
   *) cmd4 ;;
esac
      </code></pre>

      <h2>Shell Arithmetic:</h2>

      <pre class="language-bash"><code class="language-bash">
In the original Bourne shell arithmetic is done using the expr command as in:
result=`expr $1 + 2`
result2=`expr $2 + $1 / 2`
result=`expr $2 \* 5`               # (note the \ on the * symbol)
      </code></pre>

      <p>With bash, an expression is normally enclosed using [ ] and can use the
      following operators, in order of precedence:</p>

      <pre class="language-bash"><code class="language-bash">
* / %       # (times, divide, remainder)
+ -         # (add, subtract)
&lt; &gt; &lt;= &gt;=   # (the obvious comparison operators)
== !=       # (equal to, not equal to)
&amp;&amp;          # (logical and)
||          # (logical or)
=           # (assignment)

      </code></pre>

      <p>Arithmetic is done using long integers.</p>

      <p>Example:</p>

      <pre class="language-bash"><code class="language-bash">
result=$[$1 + 3]
      </code></pre>

      <p>In this example we take the value of the first parameter, add 3, and place
      the sum into result.</p>

      <h2>Order of Interpretation:</h2>

      <p>The bash shell carries out its various types of interpretation for each line
      in the following order:</p>

      <pre class="language-bash"><code class="language-bash">
brace expansion        # (see a reference book)
~ expansion            # (for login ids)
parameters             # (such as $1)
variables              # (such as $var)
command substitution   # (Example:  match=`grep DNS *` )
arithmetic             # (from left to right)
word splitting
pathname expansion     # (using *, ?, and [abc] )
      </code></pre>

      <h2>Other Shell Features:</h2>

      <pre class="language-bash"><code class="language-bash">
$var           # Value of shell variable var.
${var}abc      # Example: value of shell variable var with string abc appended.

#       # At start of line, indicates a comment.

var=value      # Assign the string value to shell variable var.
cmd1 &amp;&amp; cmd2   # Run cmd1, then if cmd1 successful run cmd2, otherwise skip.
cmd1 || cmd2   # Run cmd1, then if cmd1 not successful run cmd2, otherwise skip.
cmd1; cmd2     # Do cmd1 and then cmd2.
cmd1 &amp; cmd2    # Do cmd1, start cmd2 without waiting for cmd1 to finish.
(cmds)         # Run cmds (commands) in a subshell.

      </code></pre>

      <p>See a good reference book for information on traps, signals, exporting of variables, functions, eval, source, etc.</p>

      <p>taken from: <a href="http://cis.stvincent.edu/html/tutorials/unix/bshellref">Bourne Shell Reference</a></p>

      <h2>See Also</h2>

      <ul>
        <li><a href="http://www.ibm.com/developerworks/aix/library/au-badunixhabits.html">UNIX tips: Learn 10 good UNIX usage habits</a></li>
        <li><a href="http://www.ibm.com/developerworks/aix/library/au-unixtips/">UNIX tips: Learn 10 more good UNIX usage habits</a></li>
        <li><a href="http://www.thegeekstuff.com/tag/bash-tutorial/">Bash Tutorial</a></li>
        <li><a href="https://gist.github.com/atelierbram/8056170">Github Gist in markdown</a></li>
      </ul>
  
</article>

            
          
!
            
              /*

Name:       Base16 Atelier Lakeside Light
Author:     Bram de Haan (https://atelierbram.github.io/syntax-highlighting/atelier-schemes/lakeside/)

Prism template by Bram de Haan (https://atelierbram.github.io/syntax-highlighting/prism/)
Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16)

 */ 

code[class*="language-"],
pre[class*="language-"] {
  color: #ebf8ff;
  font-family: 'Source Code Pro', Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace;
  font-size: 13px;
  line-height: 1.375;
  direction: ltr;
  text-align: left;
  word-spacing: normal;

  -moz-tab-size: 4;
  -o-tab-size: 4;
  tab-size: 4;

  -webkit-hyphens: none;
  -moz-hyphens: none;
  -ms-hyphens: none;
  hyphens: none; 
  white-space: pre; 
  white-space: pre-wrap; 
  word-break: break-all;
  word-wrap: break-word; 
  background: #ebf8ff; 
  color: #516d7b;
}

/* Code blocks */
pre[class*="language-"] {
  padding: 1em;
  margin: .5em 0;
  overflow: auto;	
}

/* Inline code */
:not(pre) > code[class*="language-"] {
  padding: .1em;
  border-radius: .3em;
}

.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
  color: #7ea2b4;
}

.token.punctuation {
  color: #516d7b;
}

.namespace {
  opacity: .7;
}

.token.null,
.token.operator,
.token.boolean,
.token.number {
  color: #935c25;
} 
.token.property { 
  color: #8a8a0f;
}
.token.tag { 
  color: #257fad;
} 
.token.string {
  color: #2d8f6f;
} 
.token.selector { 
  color: #5d5db1;
}
.token.attr-name { 
  color: #935c25;
} 
.token.entity,
.token.url, 
.language-css .token.string,
.style .token.string {
  color: #2d8f6f;
}

.token.attr-value,
.token.keyword,
.token.control,
.token.directive,
.token.unit {
  color: #568c3b;
} 

.token.statement,
.token.regex, 
.token.atrule { 
  color: #2d8f6f;
}

.token.placeholder,
.token.variable {
  color: #257fad;
} 

.token.important {
  color: #d22d72;
  font-weight: bold;
} 

.token.entity {
  cursor: help;
} 

pre > code.highlight {
  outline: .4em solid red;
  outline-offset: .4em;
} 
* {
  margin: 0;
  padding: 0;
}
html,
body {
  background-color: #161b1d;
  width: 100%;
}

body {
  font: 100%/1.375 AvenirNext-Regular, "Lucida Grande", Corbel, "Trebuchet Ms", sans-serif; 

}
article {
  margin: 0 auto;
/*  max-width: 45em;*/
  background-color: #c1e4f6;
  border-style: solid;
  border-width: .5em .125em;
  border-color: #5d5db1;
  color: #161b1d;
  -webkit-box-sizing: border-box;
     -moz-box-sizing: border-box;
          box-sizing: border-box; 
  padding: 1em 2.5%;
}
h1, h2, a {
  font-family: AvenirNextCondensed-DemiBold, "Lucida Grande", Corbel, "Trebuchet Ms", sans-serif;
}
h1 {
  font-size: 2.5em;
  text-align: center;
}
h2 {
  font-size: 1.75em;
  margin-top: 1em;
}
p {
  font-size: 1.125em;
  padding: .25em 2em .25em .5em ;
}
a {
  display: inline-block;
  padding: .125em .25em;
  text-decoration: none;
  color: #d22d72;
  border-bottom: 2px solid transparent;
}
a:hover {
    border-bottom: 2px solid #d22d72;
}
ul {
  list-style: square;
  padding-left: .5em;
}
ul li {
  margin: .25em 0 0 .3em;
  color: #5d5db1;
  text-indent: -.3em;
}
pre[class*="language-"] {
  margin: 1em 0 2em;
}
            
          
!
            
              /* **********************************************
     Begin prism-core.js
********************************************** */

/**
 * Prism: Lightweight, robust, elegant syntax highlighting
 * MIT license https://www.opensource.org/licenses/mit-license.php/
 * @author Lea Verou http://lea.verou.me
 */

(function(){

// Private helper vars
var lang = /\blang(?:uage)?-(?!\*)(\w+)\b/i;

var _ = self.Prism = {
	util: {
		type: function (o) { 
			return Object.prototype.toString.call(o).match(/\[object (\w+)\]/)[1];
		},
		
		// Deep clone a language definition (e.g. to extend it)
		clone: function (o) {
			var type = _.util.type(o);

			switch (type) {
				case 'Object':
					var clone = {};
					
					for (var key in o) {
						if (o.hasOwnProperty(key)) {
							clone[key] = _.util.clone(o[key]);
						}
					}
					
					return clone;
					
				case 'Array':
					return o.slice();
			}
			
			return o;
		}
	},
	
	languages: {
		extend: function (id, redef) {
			var lang = _.util.clone(_.languages[id]);
			
			for (var key in redef) {
				lang[key] = redef[key];
			}
			
			return lang;
		},
		
		// Insert a token before another token in a language literal
		insertBefore: function (inside, before, insert, root) {
			root = root || _.languages;
			var grammar = root[inside];
			var ret = {};
				
			for (var token in grammar) {
			
				if (grammar.hasOwnProperty(token)) {
					
					if (token == before) {
					
						for (var newToken in insert) {
						
							if (insert.hasOwnProperty(newToken)) {
								ret[newToken] = insert[newToken];
							}
						}
					}
					
					ret[token] = grammar[token];
				}
			}
			
			return root[inside] = ret;
		},
		
		// Traverse a language definition with Depth First Search
		DFS: function(o, callback) {
			for (var i in o) {
				callback.call(o, i, o[i]);
				
				if (_.util.type(o) === 'Object') {
					_.languages.DFS(o[i], callback);
				}
			}
		}
	},

	highlightAll: function(async, callback) {
		var elements = document.querySelectorAll('code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code');

		for (var i=0, element; element = elements[i++];) {
			_.highlightElement(element, async === true, callback);
		}
	},
		
	highlightElement: function(element, async, callback) {
		// Find language
		var language, grammar, parent = element;
		
		while (parent && !lang.test(parent.className)) {
			parent = parent.parentNode;
		}
		
		if (parent) {
			language = (parent.className.match(lang) || [,''])[1];
			grammar = _.languages[language];
		}

		if (!grammar) {
			return;
		}
		
		// Set language on the element, if not present
		element.className = element.className.replace(lang, '').replace(/\s+/g, ' ') + ' language-' + language;
		
		// Set language on the parent, for styling
		parent = element.parentNode;
		
		if (/pre/i.test(parent.nodeName)) {
			parent.className = parent.className.replace(lang, '').replace(/\s+/g, ' ') + ' language-' + language; 
		}

		var code = element.textContent;
		
		if(!code) {
			return;
		}
		
		code = code.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/\u00a0/g, ' ');
		
		var env = {
			element: element,
			language: language,
			grammar: grammar,
			code: code
		};
		
		_.hooks.run('before-highlight', env);
		
		if (async && self.Worker) {
			var worker = new Worker(_.filename);	
			
			worker.onmessage = function(evt) {
				env.highlightedCode = Token.stringify(JSON.parse(evt.data), language);

				_.hooks.run('before-insert', env);

				env.element.innerHTML = env.highlightedCode;
				
				callback && callback.call(env.element);
				_.hooks.run('after-highlight', env);
			};
			
			worker.postMessage(JSON.stringify({
				language: env.language,
				code: env.code
			}));
		}
		else {
			env.highlightedCode = _.highlight(env.code, env.grammar, env.language)

			_.hooks.run('before-insert', env);

			env.element.innerHTML = env.highlightedCode;
			
			callback && callback.call(element);
			
			_.hooks.run('after-highlight', env);
		}
	},
	
	highlight: function (text, grammar, language) {
		return Token.stringify(_.tokenize(text, grammar), language);
	},
	
	tokenize: function(text, grammar, language) {
		var Token = _.Token;
		
		var strarr = [text];
		
		var rest = grammar.rest;
		
		if (rest) {
			for (var token in rest) {
				grammar[token] = rest[token];
			}
			
			delete grammar.rest;
		}
								
		tokenloop: for (var token in grammar) {
			if(!grammar.hasOwnProperty(token) || !grammar[token]) {
				continue;
			}
			
			var pattern = grammar[token], 
				inside = pattern.inside,
				lookbehind = !!pattern.lookbehind,
				lookbehindLength = 0;
			
			pattern = pattern.pattern || pattern;
			
			for (var i=0; i<strarr.length; i++) { // Don’t cache length as it changes during the loop
				
				var str = strarr[i];
				
				if (strarr.length > text.length) {
					// Something went terribly wrong, ABORT, ABORT!
					break tokenloop;
				}
				
				if (str instanceof Token) {
					continue;
				}
				
				pattern.lastIndex = 0;
				
				var match = pattern.exec(str);
				
				if (match) {
					if(lookbehind) {
						lookbehindLength = match[1].length;
					}

					var from = match.index - 1 + lookbehindLength,
					    match = match[0].slice(lookbehindLength),
					    len = match.length,
					    to = from + len,
						before = str.slice(0, from + 1),
						after = str.slice(to + 1); 

					var args = [i, 1];
					
					if (before) {
						args.push(before);
					}
					
					var wrapped = new Token(token, inside? _.tokenize(match, inside) : match);
					
					args.push(wrapped);
					
					if (after) {
						args.push(after);
					}
					
					Array.prototype.splice.apply(strarr, args);
				}
			}
		}

		return strarr;
	},
	
	hooks: {
		all: {},
		
		add: function (name, callback) {
			var hooks = _.hooks.all;
			
			hooks[name] = hooks[name] || [];
			
			hooks[name].push(callback);
		},
		
		run: function (name, env) {
			var callbacks = _.hooks.all[name];
			
			if (!callbacks || !callbacks.length) {
				return;
			}
			
			for (var i=0, callback; callback = callbacks[i++];) {
				callback(env);
			}
		}
	}
};

var Token = _.Token = function(type, content) {
	this.type = type;
	this.content = content;
};

Token.stringify = function(o, language, parent) {
	if (typeof o == 'string') {
		return o;
	}

	if (Object.prototype.toString.call(o) == '[object Array]') {
		return o.map(function(element) {
			return Token.stringify(element, language, o);
		}).join('');
	}
	
	var env = {
		type: o.type,
		content: Token.stringify(o.content, language, parent),
		tag: 'span',
		classes: ['token', o.type],
		attributes: {},
		language: language,
		parent: parent
	};
	
	if (env.type == 'comment') {
		env.attributes['spellcheck'] = 'true';
	}
	
	_.hooks.run('wrap', env);
	
	var attributes = '';
	
	for (var name in env.attributes) {
		attributes += name + '="' + (env.attributes[name] || '') + '"';
	}
	
	return '<' + env.tag + ' class="' + env.classes.join(' ') + '" ' + attributes + '>' + env.content + '</' + env.tag + '>';
	
};

if (!self.document) {
	// In worker
	self.addEventListener('message', function(evt) {
		var message = JSON.parse(evt.data),
		    lang = message.language,
		    code = message.code;
		
		self.postMessage(JSON.stringify(_.tokenize(code, _.languages[lang])));
		self.close();
	}, false);
	
	return;
}

// Get current script and highlight
var script = document.getElementsByTagName('script');

script = script[script.length - 1];

if (script) {
	_.filename = script.src;
	
	if (document.addEventListener && !script.hasAttribute('data-manual')) {
		document.addEventListener('DOMContentLoaded', _.highlightAll);
	}
}

})();

/* **********************************************
     Begin prism-markup.js
********************************************** */

Prism.languages.markup = {
	'comment': /&lt;!--[\w\W]*?-->/g,
	'prolog': /&lt;\?.+?\?>/,
	'doctype': /&lt;!DOCTYPE.+?>/,
	'cdata': /&lt;!\[CDATA\[[\w\W]*?]]>/i,
	'tag': {
		pattern: /&lt;\/?[\w:-]+\s*(?:\s+[\w:-]+(?:=(?:("|')(\\?[\w\W])*?\1|\w+))?\s*)*\/?>/gi,
		inside: {
			'tag': {
				pattern: /^&lt;\/?[\w:-]+/i,
				inside: {
					'punctuation': /^&lt;\/?/,
					'namespace': /^[\w-]+?:/
				}
			},
			'attr-value': {
				pattern: /=(?:('|")[\w\W]*?(\1)|[^\s>]+)/gi,
				inside: {
					'punctuation': /=|>|"/g
				}
			},
			'punctuation': /\/?>/g,
			'attr-name': {
				pattern: /[\w:-]+/g,
				inside: {
					'namespace': /^[\w-]+?:/
				}
			}
			
		}
	},
	'entity': /&amp;#?[\da-z]{1,8};/gi
};

// Plugin to make entity title show the real entity, idea by Roman Komarov
Prism.hooks.add('wrap', function(env) {

	if (env.type === 'entity') {
		env.attributes['title'] = env.content.replace(/&amp;/, '&');
	}
});

/* **********************************************
     Begin prism-css.js
********************************************** */

Prism.languages.css = {
	'comment': /\/\*[\w\W]*?\*\//g,
	'atrule': {
		pattern: /@[\w-]+?.*?(;|(?=\s*{))/gi,
		inside: {
			'punctuation': /[;:]/g
		}
	},
	'url': /url\((["']?).*?\1\)/gi,
	'selector': /[^\{\}\s][^\{\};]*(?=\s*\{)/g,
	'property': /(\b|\B)[\w-]+(?=\s*:)/ig,
	'string': /("|')(\\?.)*?\1/g,
	'important': /\B!important\b/gi,
	'ignore': /&(lt|gt|amp);/gi,
	'punctuation': /[\{\};:]/g
};

if (Prism.languages.markup) {
	Prism.languages.insertBefore('markup', 'tag', {
		'style': {
			pattern: /(&lt;|<)style[\w\W]*?(>|&gt;)[\w\W]*?(&lt;|<)\/style(>|&gt;)/ig,
			inside: {
				'tag': {
					pattern: /(&lt;|<)style[\w\W]*?(>|&gt;)|(&lt;|<)\/style(>|&gt;)/ig,
					inside: Prism.languages.markup.tag.inside
				},
				rest: Prism.languages.css
			}
		}
	});
}

/* **********************************************
     Begin prism-clike.js
********************************************** */

Prism.languages.clike = {
	'comment': {
		pattern: /(^|[^\\])(\/\*[\w\W]*?\*\/|(^|[^:])\/\/.*?(\r?\n|$))/g,
		lookbehind: true
	},
	'string': /("|')(\\?.)*?\1/g,
	'class-name': {
		pattern: /((?:class|interface|extends|implements|trait|instanceof|new)\s+)[a-z0-9_\.\\]+/ig,
		lookbehind: true,
		inside: {
			punctuation: /(\.|\\)/
		}
	},
	'keyword': /\b(if|else|while|do|for|return|in|instanceof|function|new|try|catch|finally|null|break|continue)\b/g,
	'boolean': /\b(true|false)\b/g,
	'function': {
		pattern: /[a-z0-9_]+\(/ig,
		inside: {
			punctuation: /\(/
		}
	},
	'number': /\b-?(0x[\dA-Fa-f]+|\d*\.?\d+([Ee]-?\d+)?)\b/g,
	'operator': /[-+]{1,2}|!|=?&lt;|=?&gt;|={1,2}|(&amp;){1,2}|\|?\||\?|\*|\/|\~|\^|\%/g,
	'ignore': /&(lt|gt|amp);/gi,
	'punctuation': /[{}[\];(),.:]/g
};

/* **********************************************
     Begin prism-javascript.js
********************************************** */

Prism.languages.javascript = Prism.languages.extend('clike', {
	'keyword': /\b(var|let|if|else|while|do|for|return|in|instanceof|function|new|with|typeof|try|catch|finally|null|break|continue)\b/g,
	'number': /\b-?(0x[\dA-Fa-f]+|\d*\.?\d+([Ee]-?\d+)?|NaN|-?Infinity)\b/g
});

Prism.languages.insertBefore('javascript', 'keyword', {
	'regex': {
		pattern: /(^|[^/])\/(?!\/)(\[.+?]|\\.|[^/\r\n])+\/[gim]{0,3}(?=\s*($|[\r\n,.;})]))/g,
		lookbehind: true
	}
});

if (Prism.languages.markup) {
	Prism.languages.insertBefore('markup', 'tag', {
		'script': {
			pattern: /(&lt;|<)script[\w\W]*?(>|&gt;)[\w\W]*?(&lt;|<)\/script(>|&gt;)/ig,
			inside: {
				'tag': {
					pattern: /(&lt;|<)script[\w\W]*?(>|&gt;)|(&lt;|<)\/script(>|&gt;)/ig,
					inside: Prism.languages.markup.tag.inside
				},
				rest: Prism.languages.javascript
			}
		}
	});
}

/* **********************************************
     Begin prism-file-highlight.js
********************************************** */

(function(){

if (!self.Prism || !self.document || !document.querySelector) {
	return;
}

var Extensions = {
	'js': 'javascript',
	'html': 'markup',
	'svg': 'markup'
};

Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach(function(pre) {
	var src = pre.getAttribute('data-src');
	var extension = (src.match(/\.(\w+)$/) || [,''])[1];
	var language = Extensions[extension] || extension;
	
	var code = document.createElement('code');
	code.className = 'language-' + language;
	
	pre.textContent = '';
	
	code.textContent = 'Loading…';
	
	pre.appendChild(code);
	
	var xhr = new XMLHttpRequest();
	
	xhr.open('GET', src, true);

	xhr.onreadystatechange = function() {
		if (xhr.readyState == 4) {
			
			if (xhr.status < 400 && xhr.responseText) {
				code.textContent = xhr.responseText;
			
				Prism.highlightElement(code);
			}
			else if (xhr.status >= 400) {
				code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
			}
			else {
				code.textContent = '✖ Error: File does not exist or is empty';
			}
		}
	};
	
	xhr.send(null);
});

})();

// http://prismjs.com/components/prism-bash.js
Prism.languages.bash = Prism.languages.extend('clike', {
	'comment': {
		pattern: /(^|[^"{\\])(#.*?(\r?\n|$))/g,
		lookbehind: true
	},
	'string': {
		//allow multiline string
		pattern: /("|')(\\?[\s\S])*?\1/g,
		inside: {
			//'property' class reused for bash variables
			'property': /\$([a-zA-Z0-9_#\?\-\*!@]+|\{[^\}]+\})/g
		}
	},
	'keyword': /\b(if|then|else|elif|fi|for|break|continue|while|in|case|function|select|do|done|until|echo|exit|return|set|declare)\b/g
});

Prism.languages.insertBefore('bash', 'keyword', {
	//'property' class reused for bash variables
	'property': /\$([a-zA-Z0-9_#\?\-\*!@]+|\{[^}]+\})/g
});
Prism.languages.insertBefore('bash', 'comment', {
	//shebang must be before comment, 'important' class from css reused
	'important': /(^#!\s*\/bin\/bash)|(^#!\s*\/bin\/sh)/g
});
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console