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
# A Docker Compose setup for running most Wordpress environments | |
# | |
# Setup: | |
# 1. Configure wp-config.php to either pull the environment variables in | |
# services.web.environment or use the same settings. | |
# 2. Optionally put a database dump in the project root which will get imported | |
# on first project boot. This will remain persistent, so if you need to wipe | |
# the database, `docker volume ls` will help you find it and | |
# `docker volume rm [volume name]` to remove it. | |
# 3. `docker-compose up` |
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
/** | |
* Calculates Easter in the Gregorian/Western (Catholic and Protestant) calendar | |
* based on the algorithm by Oudin (1940) from http://www.tondering.dk/claus/cal/easter.php | |
* @returns {array} [int month, int day] | |
*/ | |
function getEaster(year) { | |
var f = Math.floor, | |
// Golden Number - 1 | |
G = year % 19, | |
C = f(year / 100), |
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
<?php | |
class Craft3ValetDriver extends ValetDriver | |
{ | |
/** | |
* Determine if the driver serves the request. | |
* | |
* @param string $sitePath | |
* @param string $siteName | |
* @param string $uri |
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
<body> | |
<div id="⚛️"></div> | |
<script src="https://unpkg.com/react@16.0.0/umd/react.development.js"></script> | |
<script src="https://unpkg.com/react-dom@16.0.0/umd/react-dom.development.js"></script> | |
<script src="https://unpkg.com/babel-standalone@6.26.0/babel.js"></script> | |
<script type="text/babel"> | |
ReactDOM.render(<div>Hello World!</div>, document.getElementById('⚛️')) | |
</script> | |
</body> |
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
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |