Give builder.io a chance to respond to paths that you don't have a route for before serving up a 404 page:
-
In
Gemfile
, addgem 'rack-cors'
andbundle
. -
In
config/application.rb
, add:config.middleware.insert_before 0, Rack::Cors do allow do
import React from 'react'; | |
import { withBuilder } from '@builder.io/react'; | |
class CloudinaryImageComponent extends React.Component { | |
render() { | |
return <img src={this.props.image} /> | |
} | |
} | |
export const CloudinaryImage = withBuilder(CloudinaryImageComponent, { |
Give builder.io a chance to respond to paths that you don't have a route for before serving up a 404 page:
In Gemfile
, add gem 'rack-cors'
and bundle
.
In config/application.rb
, add:
config.middleware.insert_before 0, Rack::Cors do
allow do
import JavaScriptCore | |
extension JSContext { | |
subscript(key: String) -> Any { | |
get { | |
return self.objectForKeyedSubscript(key) | |
} | |
set{ | |
self.setObject(newValue, forKeyedSubscript: key as NSCopying & NSObjectProtocol) | |
} |
While many remember the epic hyperHTML: A Virtual DOM Alternative post
I've published the 5th of March 2017,
the first official implementation
of the library was working as hyperHTML.bind(node)
function for tagged literals the day before, and it's been in my experiments folder already for a little while.
At first glance people couldn't believe performance of the DBMonster demo shown in that article,
I recently had several days of extremely frustrating experiences with service workers. Here are a few things I've since learned which would have made my life much easier but which isn't particularly obvious from most of the blog posts and videos I've seen.
I'll add to this list over time – suggested additions welcome in the comments or via twitter.com/rich_harris.
Chrome 51 has some pretty wild behaviour related to console.log
in service workers. Canary doesn't, and it has a load of really good service worker related stuff in devtools.
What happens if you tell GitHub it's JSON
{
"hello": "world" // I want my comments!
}
Use jsonc
as the language instead
{
ffmpeg -i test.mov -vcodec libx264 -vf 'scale=640:trunc(ow/a/2)*2' -acodec aac -vb 1024k -minrate 1024k -maxrate 1024k -bufsize 1024k -ar 44100 -strict experimental -r 30 out.mp4 |
<?xml version="1.0" encoding="utf-8"?> | |
<colorTheme id="9999" name="One Dark Like" modified="2015-09-01 19:55:49" author="Adam Gent" website="http://snaphop.com"> | |
<searchResultIndication color="#E5C07B" /> | |
<filteredSearchResultIndication color="#E5C07B" /> | |
<occurrenceIndication color="#4B4E55" /> | |
<writeOccurrenceIndication color="#4B4E55" /> | |
<findScope color="#4B4E55" /> | |
<deletionIndication color="#DF5F5F" /> | |
<sourceHoverBackground color="#4B4E55" /> | |
<singleLineComment color="#969896" italic="false" /> |
import Control.Monad | |
------------------------------------------------------------------------------- | |
-- State Monad Implementation | |
------------------------------------------------------------------------------- | |
newtype State s a = State { runState :: s -> (a,s) } | |
instance Monad (State s) where | |
return a = State $ \s -> (a, s) |