Skip to content

Instantly share code, notes, and snippets.

View notnek's full-sized avatar
🚀

Kenton Glass notnek

🚀
View GitHub Profile
@notnek
notnek / docker-compose.yml
Created April 29, 2022 18:41 — forked from SeanSith/docker-compose.yml
Docker-Compose definition for a light Wordpress Stack
# 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`
@notnek
notnek / easter.js
Created January 30, 2019 18:42 — forked from johndyer/easter.js
Calculate Easter in JavaScript
/**
* 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),
@notnek
notnek / Craft3ValetDriver.php
Created January 14, 2019 16:13 — forked from brianjhanson/Craft3ValetDriver.php
Valet Driver for Craft 3
<?php
class Craft3ValetDriver extends ValetDriver
{
/**
* Determine if the driver serves the request.
*
* @param string $sitePath
* @param string $siteName
* @param string $uri
@notnek
notnek / buildStr.js
Last active February 5, 2018 13:51
1-liner function for building up strings
// https://twitter.com/peterpme/status/950137901198659584
const buildStr = (delim, arr) => arr.filter(i => i).join(delim)
buildString(',', [undefined, 'Illinois']) // Illinois
buildString(' @ ', ['Developer', 'Orchard']) // Developer @ Orchard
buildString('/', ['api', 'users', '123']) // api/users/123
@notnek
notnek / index.html
Created January 18, 2018 15:48 — forked from kentcdodds/index.html
The one true react boilerplate
<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>

Keybase proof

I hereby claim:

  • I am notnek on github.
  • I am kenton (https://keybase.io/kenton) on keybase.
  • I have a public key ASAY430rHVRtuZKkmfWBBX0hzZ4pHLZwqov0QDkvwvdFggo

To claim this, I am signing this object:

@notnek
notnek / capybara cheat sheet
Created April 5, 2016 15:22 — forked from zhengjia/capybara cheat sheet
capybara cheat sheet
=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')