- Download the "Start HTTP Server Here.command" file
- In Safari you can do that by ⌥ (option) clicking the "raw" link next to that script.
- Add the executable flag
so that it will run when you double-click it- type
chmod +x "$HOME/Downloads/Start HTTP Server Here.command"
- type
- Move the
command
file into the root folder of your website - Double-click it to start your webserver.
Your browser will load it up automatically
🏳️🌈
- GitHub Staff
- http://digitarald.de
- @digitarald
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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> | |
<meta charset="utf-8"> | |
<title>Famous test</title> | |
<meta name="viewport" content="width=device-width, maximum-scale=1, user-scalable=no" /> | |
<style> | |
html, body { | |
margin: 0; | |
padding: 0; |
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
#!/bin/bash | |
# Disables the adb timeout | |
set -e | |
ADB=${ADB:-adb} | |
$ADB wait-for-device | |
B2G_PREF_DIR=/system/b2g/defaults/pref | |
TMP_DIR=/tmp/adb-timeout-prefs | |
rm -rf $TMP_DIR |
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
//Config variables | |
var rest_length = 256.0 | |
var spring_constant = 1.0 | |
var dt = 0.01 | |
//Hooke's law | |
function force(displacement) { | |
return spring_constant * (rest_length - displacement) | |
} |
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
// Linear Congruential Generator | |
// Variant of a Lehman Generator | |
var lcg = (function() { | |
// Set to values from http://en.wikipedia.org/wiki/Numerical_Recipes | |
// m is basically chosen to be large (as it is the max period) | |
// and for its relationships to a and c | |
var m = 4294967296, | |
// a - 1 should be divisible by m's prime factors | |
a = 1664525, | |
// c and m should be co-prime |
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
/* | |
* window.Notification polyfill | |
* @author Emilio Cobos (http://emiliocobos.net) | |
*/ | |
/* try prefixed */ | |
if( ! window.Notification ) { | |
window.Notification = (function() { | |
return window.Notification || window.webkitNotification || window.mozNotification || window.oNotification || window.msNotification; | |
})() |
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
// manage a webapp. | |
// place <link rel="app-manifest" href="path-to-manifest.webapp"> in your <head> | |
// mozApp.install() attempts installation | |
// mozApp.uninstall() removes | |
// mozApp.isRunning() indicates whether the app is currently installed and open | |
var mozApp = (function() { | |
var manLink = document.querySelector('link[rel="app-manifest"]'), | |
manifestURL = manLink.href; | |
var self = 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
// Ported from Stefan Gustavson's java implementation | |
// http://staffwww.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf | |
// Read Stefan's excellent paper for details on how this code works. | |
// | |
// Sean McCullough [email protected] | |
/** | |
* You can pass in a random number generator object if you like. | |
* It is assumed to have a random() method. | |
*/ |