Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| /** | |
| * Load media uploader on pages with our custom metabox | |
| */ | |
| jQuery(document).ready(function($){ | |
| 'use strict'; | |
| // Instantiates the variable that holds the media library frame. | |
| var metaImageFrame; |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8" /> | |
| <title>Mocha Tests</title> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
| <link rel="stylesheet" href="https://unpkg.com/mocha/mocha.css" /> | |
| </head> | |
| <body> | |
| <div id="mocha"></div> |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Learn Vanilla JS</title> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <!-- Styles --> | |
| <style type="text/css"> |
| # Terminal Cheat Sheet | |
| pwd # print working directory | |
| ls # list files in directory | |
| cd # change directory | |
| ~ # home directory | |
| .. # up one directory | |
| - # previous working directory | |
| help # get help | |
| -h # get help |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Basic Setup</title> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <style type="text/css"> | |
| body { | |
| margin: 1em auto; |
This script automates the publishing of a new release on GitHub and runs npm deploy whenever the version number in package.json is changed.
It requires two secret tokens in the repo settings:
GH_TOKEN - a fine-grained token with read/write permissions for content and pull releases.NPM_TOKEN - a CI token from your NPM account.| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Code Sandbox</title> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <style> | |
| body { |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Toast Library</title> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <style> | |
| body { |
| /** | |
| * Stop an iframe or HTML5 <video> from playing | |
| * @param {Element} element The element that contains the video | |
| */ | |
| var stopVideo = function ( element ) { | |
| var iframe = element.querySelector( 'iframe'); | |
| var video = element.querySelector( 'video' ); | |
| if ( iframe ) { | |
| var iframeSrc = iframe.src; | |
| iframe.src = iframeSrc; |