Skip to content

Instantly share code, notes, and snippets.

@wking-io
wking-io / thank-you.html
Last active January 11, 2022 22:12
Tailwind classes to spruce up your thank you page.
<div class="inside-article text-center max-w-xl mx-auto w-5/6 py-16">
<header class="" aria-label="Content">
<h1 class="font-extrabold text-gray-900" itemprop="headline">Thank you</h1>
</header>
<div class="entry-content" itemprop="text">
<p class="has-text-align-center"><strong>Thank you for starting your trial! We have sent you an email with your credentials.</strong><br><br>If you need any help, do not hesitate to contact us.</p>
</div>
</div>
@wking-io
wking-io / .babelrc
Created May 21, 2021 22:12
Tailwind + Phoenix Setup
{
"presets": [
"@babel/preset-env"
]
}
@wking-io
wking-io / package.json
Created May 21, 2021 22:08
Tailwind + Phoenix Setup
{
"repository": {},
"description": " ",
"license": "MIT",
"scripts": {
"deploy": "webpack --mode production",
"watch": "TAILWIND_MODE=watch NODE_ENV=development webpack --mode development --watch"
},
"dependencies": {
"phoenix": "file:../deps/phoenix",
## Params
# {
# "user" => {
# "owned_accounts_attributes" => { "0" => { "name" => "[FILTERED]" } },
# "name"=>"[FILTERED]",
# "email"=>"[FILTERED]",
# "password"=>"[FILTERED]",
# "time_zone"=>"Central Time (US & Canada)",
# "terms_of_service"=>"0"
@wking-io
wking-io / functions.php
Last active September 18, 2019 17:24
Filter out posts from index page to show only one specific category
function customize_query ( $query ) {
// Make sure this is only effecting the public side
if ( ! is_admin() ) :
// Make sure this is a query for the post page and is the main query for the page
if ( is_home() && $query->is_main_query() ) :
// Set query to only pull posts from the specified category
$query->set( 'category_name', 'Newsletter' );
endif;
endif;
@wking-io
wking-io / SketchSystems.spec
Last active May 15, 2019 15:40
Role Menu Editor
Role Menu Editor
Loading Page
success -> Edit Role
permission failure -> Load Error
nonce failure -> Load Error
data failure -> Load Error
network failure -> Load Error
missing role failure -> Load Error
Edit Role
change role -> Loading Page
{-| This is the error I am getting:
-- NAMING ERROR ----------------- /Users/wking/sites/elm-pair/tests/PairSpec.elm
I cannot find a `Pair.from` variable:
17| Pair.from 0 randomMaybe
^^^^^^^^^
The `Pair` module does not expose a `from` variable. These names seem close
though:
@wking-io
wking-io / generateKeyframes.js
Last active December 12, 2018 04:12
Dynamic Keyframes - CSS-in-JS
// Main function w/helpers for readibility
const generateKeyframes = total => frames =>
Array
.from({ length: total })
.reduce((acc, _, i) =>
ifElse(
hasFrame(frames),
makeKeyframe(total, frames, acc),
always(acc)
)(i)
@wking-io
wking-io / elm-handler.js
Last active November 19, 2018 02:27
Elm Handler for React
import React from 'react'
import PropTypes from 'prop-types'
class ElmHandler extends React.Component {
node = React.createRef()
/**
* Setup the Elm app using the ref for this components node
* using the flags passed in as props. Connect the port handler
* function passed in from props to the ports established in the