Skip to content

Instantly share code, notes, and snippets.

View tilsammans's full-sized avatar

Joost Baaij tilsammans

View GitHub Profile
<form id="postcodecheck">
<input id="postcode" name="postcode" placeholder="1234AA">
<input id="housenumber" name="housenumber" placeholder="1">
<input id="housenumber_addition" name="housenumber_addition" placeholder="a">
<input type="submit" value="Check!" class="next-button">
<p class="postcodecheck-result"></p>
</form>
<script>
$(function() {
var PostcodeCheck = React.createClass({
// omitting existing code for brevity
getInitialState: function() {
return {
postcode: '',
housenumber: '',
housenumberAddition: '',
result: ''
var PostcodeCheck = React.createClass({
// all existing code again omitted
handleSubmit: function(e) {
e.preventDefault();
if (!this.state.postcode || !this.state.housenumber) {
this.setState({result: 'Postcode en huisnummer zijn verplichte velden.'});
return;
<%= react_component('PostcodeCheck') %>
echo "gem 'react-rails'" >> Gemfile
bundle
rails g react:install
["/Users/joost/.rbenv/versions/2.1.6/lib/ruby/gems/2.1.0/gems/activesupport-4.1.14.1/lib/active_support/locale/en.yml", "/Users/joost/.rbenv/versions/2.1.6/lib/ruby/gems/2.1.0/gems/activemodel-4.1.14.1/lib/active_model/locale/en.yml", "/Users/joost/.rbenv/versions/2.1.6/lib/ruby/gems/2.1.0/gems/activerecord-4.1.14.1/lib/active_record/locale/en.yml", "/Users/joost/.rbenv/versions/2.1.6/lib/ruby/gems/2.1.0/gems/actionview-4.1.14.1/lib/action_view/locale/en.yml", "/Users/joost/.rbenv/versions/2.1.6/lib/ruby/gems/2.1.0/gems/ransack-1.7.0/lib/ransack/locale/cs.yml", "/Users/joost/.rbenv/versions/2.1.6/lib/ruby/gems/2.1.0/gems/ransack-1.7.0/lib/ransack/locale/de.yml", "/Users/joost/.rbenv/versions/2.1.6/lib/ruby/gems/2.1.0/gems/ransack-1.7.0/lib/ransack/locale/en.yml", "/Users/joost/.rbenv/versions/2.1.6/lib/ruby/gems/2.1.0/gems/ransack-1.7.0/lib/ransack/locale/es.yml", "/Users/joost/.rbenv/versions/2.1.6/lib/ruby/gems/2.1.0/gems/ransack-1.7.0/lib/ransack/locale/fr.yml", "/Users/joost/.rbenv/versions/2.1.6/lib/ruby
Mysql2::Error: Table 'storyboard_production.pageflow_sites' doesn't exist
from active_record/connection_adapters/abstract_mysql_adapter.rb:303:in `query'
from active_record/connection_adapters/abstract_mysql_adapter.rb:303:in `block in execute'
from active_record/connection_adapters/abstract_adapter.rb:378:in `block in log'
from active_support/notifications/instrumenter.rb:20:in `instrument'
from active_record/connection_adapters/abstract_adapter.rb:372:in `log'
from active_record/connection_adapters/abstract_mysql_adapter.rb:303:in `execute'
from active_record/connection_adapters/mysql2_adapter.rb:228:in `execute'
from active_record/connection_adapters/abstract_mysql_adapter.rb:310:in `execute_and_free'
from active_record/connection_adapters/abstract_mysql_adapter.rb:451:in `columns'
@tilsammans
tilsammans / gist:1eab2bd101ad1486c3e0707722cce464
Last active March 8, 2017 08:10
zencoder failure from 4k input
{
"job": {
"created_at": "2017-03-06T10:17:05Z",
"finished_at": "2017-03-06T10:18:33Z",
"id": 353083574,
"pass_through": null,
"privacy": false,
"state": "failed",
"submitted_at": "2017-03-06T10:17:05Z",
"test": false,
{
"input":"s3://media.scrollytelling.io/main/video_files/attachment_on_s3s/000/001/090/original/NIKLAAS_P._HOYNG9118.mp4",
"outputs":[
{
"label":"webm_high",
"format":"webm",
"size":"1280x720",
"quality":4,
"max_video_bitrate":3500,
"public":1,
@tilsammans
tilsammans / NetlifyServerPushPlugin.js
Last active January 17, 2018 08:57 — forked from ValentinFunk/NetlifyServerPushPlugin.js
Webpack - Generate Netlify HTTP2 Server Push _headers File when using the HtmlWebpackPlugin
/**
* Generate a Netlify HTTP2 Server Push configuration.
*
* Options:
* - headersFile {string} path to the _headers file that should be generated (relative to your output dir)
*/
function NetlifyServerPushPlugin(options) {
this.options = options;
}