import "./formik-demo.css";
import React from "react";
import { render } from "react-dom";
import { Formik, Field } from "formik";
import Yup from "yup";
import classNames from "classnames";
// Input feedback
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
{ | |
"AWSEBDockerrunVersion": "1", | |
"Image": { | |
"Name": "<AWS_ACCOUNT_ID>.dkr.ecr.us-east-1.amazonaws.com/<NAME>:<TAG>", | |
"Update": "true" | |
}, | |
"Ports": [ | |
{ | |
"ContainerPort": "443" | |
} |
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
/**********************************************/ | |
/* | |
/* | |
/* Crate -- Theme for Chrome DevTools | |
/* Last Update :: September 2013 | |
/* | |
/* based on: | |
/* mnml by Michael P. Pfeiffer | |
/* Based on a Gist by Ben Truyman. Further attr: | |
/* https://gist.github.com/3040634 |
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
# NullStorage provider for CarrierWave for use in tests. Doesn't actually | |
# upload or store files but allows test to pass as if files were stored and | |
# the use of fixtures. | |
class NullStorage | |
attr_reader :uploader | |
def initialize(uploader) | |
@uploader = uploader | |
end |
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
"use strict"; | |
function jsonToSassVars (obj, indent) { | |
// Make object root properties into sass variables | |
var sass = ""; | |
for (var key in obj) { | |
sass += "$" + key + ":" + JSON.stringify(obj[key], null, indent) + ";\n"; | |
} | |
// Store string values (so they remain unaffected) |
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
/* | |
# jquery.couch.longpoll.js # | |
A handler that can be used to listen to changes from a CouchDB database, | |
using long-polling. | |
This seemed to be a bit simpler than using continuous polling, which I | |
was unable to get working with jQuery. |
When you submit the form#filters_form, it requests the response in the background, replaces the existing contents of #article_blocks with the #article_blocks from the response, and updates the url with the params given.
Oh, and if it fails, it redirects you to the form url, so that you're not left in a broken ajax state.
So:
- No fancy ajax logic server-side
- No fancy ajax logic client-side
- Just the bit of content you wanted gets updated
Disclaimer: Tweaks would be needed for POST forms
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
var hands = [ | |
'rock', | |
'paper', | |
'scissors', | |
'water', | |
'dynamite' | |
]; | |
var opponents = [] |
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
#!/bin/sh | |
### BEGIN INIT INFO | |
# Provides: unicorn | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Manage unicorn server | |
# Description: Start, stop, restart unicorn server for a specific application. | |
### END INIT INFO |
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
#!/bin/bash | |
while getopts "v:" OPTION; do | |
case $OPTION in | |
v) shift; verbose=true;; | |
# Unknown option. No need for an error, getopts informs | |
# the user itself. | |
\?) exit 1;; | |
esac | |
done |