cd /Library/Preferences
sudo rm com.sophos.sav.plist
cd /Library/Application\ Support/Sophos/cloud/Installer.app/Contents/MacOS/tools/
sudo ./InstallationDeployer —force_remove
import React, { Component, PropTypes } from 'react' | |
class RichTextMarkdown extends Component { | |
static propTypes = { | |
input: PropTypes.shape({ | |
onChange: PropTypes.func.isRequired, | |
value: PropTypes.string | |
}).isRequired | |
} |
const FadeRoute = ({ component: Component, ...rest }) => { | |
return ( | |
<Route {...rest} children={({ location, match }) => ( | |
<TransitionMotion | |
willEnter={() => {return {opacity: 0, translateX: 24}}} | |
willLeave={() => {return {opacity: spring(0, animationPresets.out), translateX: spring(24)}}} | |
defaultStyles={[ { | |
key: location.pathname, | |
style: { opacity: 0, translateX: 24}, |
The code here captures some of the patterns I used in the "real estate" demo app discussed in my talk End to End Apps with Polymer from Polymer Summit 2017.
There are many ways to connect Redux to custom elements, and this demonstrates just one pattern. The most important aspects are to try and lazily-load as much of the otherwise global state management logic along with the components that need them (as shown via the lazyReducerEnhancer
and addReducers
calls in the connected components), and to consider the tradeoffs you make in terms of coupling components to the store.
The pattern shown here of creating a stateless component and then a subclass that connects it to the store addresses a potential desire to reuse app-level stateless components between more than one application context, so the subclass provides a degree of decoupling from the concrete store, at the expense of more boilerplate. If app com
I'm messing around with a generic way to do hot-module-replacement with generic web components whether they be vanilla, or done in a framework like Polymer or Skate.
The idea is that you call hmr(customElementConstructor)
in your module files and it will set up the proper hooks.
The const filename
should be inserted at build time so that it can remember the original localName
of the component for the module.
#!/bin/bash | |
# Remove merged git branches locally and on remote(s) | |
set -e | |
# Script constants | |
BRANCH_WHITELIST="(\*|master|other-special-branches)" | |
REMOTES="origin" # Add more remotes here as space-separated list | |
echo "Deleting merged branches locally" |
FROM ruby:2.6.1 | |
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash \ | |
&& apt-get update && apt-get install -y nodejs xvfb libfontconfig wkhtmltopdf && rm -rf /var/lib/apt/lists/* \ | |
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ | |
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \ | |
&& apt-get update && apt-get install -y yarn && rm -rf /var/lib/apt/lists/* | |
# Packages for wkhtmltopdf. These are available in ubuntu but not in debian 9. Base image uses debian 9. | |
RUN wget -q -O /tmp/libjpeg-turbo8.deb http://archive.ubuntu.com/ubuntu/pool/main/libj/libjpeg-turbo/libjpeg-turbo8_2.0.1-0ubuntu2_amd64.deb \ | |
&& dpkg -i /tmp/libjpeg-turbo8.deb \ |