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 | |
""" | |
Modification of `python -m SimpleHTTPServer` with a fallback to /index.html | |
on requests for non-existing files. | |
This is useful when serving a static single page application using the HTML5 | |
history API. | |
""" | |
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
<!-- Script --> | |
<script> | |
export let name = 'world'; | |
let num = 5; | |
function sayHello() { | |
console.log(`Hello ${name}`); | |
} | |
</script> |
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
/** | |
* Peer 1 (Sender) | |
* Peer 2 (Receiver) | |
* This example has both the peers in the same browser window. | |
* In a real application, the peers would exchange their signaling data for a proper connection. | |
* The signaling server part is omitted for simplicity | |
*/ | |
const peer1 = new SimplePeer({ initiator: true }); | |
const peer2 = new SimplePeer(); |
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
# This program generates a number spiral based on number entered by user | |
# Example: If input is 4, output is | |
# 01 02 03 04 | |
# 12 13 14 05 | |
# 11 16 15 06 | |
# 10 09 08 07 |