-
Create new keystore.jks file with comand line (not android studio build menu)
Linux:
keytool -genkeypair -alias upload -keyalg RSA -keysize 2048 -validity 9125 -keystore keystore.jks
Windows:
"C:\Program Files\Android\Android Studio\jre\bin\keytool.exe" -genkeypair -alias upload -keyalg RSA -keysize 2048 -validity 9125 -keystore "C:\keystore_new.jks"
-
Generate a .pem file from new keystore
I got to here after spending hours trying to deploy to an Elastic Beanstalk instance via CircleCi 2.0 so I thought I'd write up what worked for me to hopefully help others. Shout out to RobertoSchneiders who's steps for getting it to work with CircleCi 1.0 were my starting point.
For the record, I'm not the most server-savvy of developers so there may be a better way of doing this.
const webpack = require('webpack') | |
const { environment } = require('@rails/webpacker') | |
// Don't use commons chunk for server_side_render chunk | |
const entries = environment.toWebpackConfig().entry | |
const commonsChunkEligible = Object.keys(entries).filter(name => name !== 'server_side_render') | |
environment.plugins.set('CommonsChunkVendor', new webpack.optimize.CommonsChunkPlugin({ | |
name: 'vendor', | |
minChunks: (module, count) => { |
# frozen_string_literal: true | |
class AssociationLoader < GraphQL::Batch::Loader | |
attr_reader :klass, :association | |
def initialize(klass, association) | |
raise ArgumentError, "association to load must be a symbol (got #{association.inspect})" unless association.is_a?(Symbol) | |
raise ArgumentError, "cannot load associations for class #{klass.name}" unless klass < ActiveRecord::Base | |
raise TypeError, "association #{association} does not exist on #{klass.name}" unless klass.reflect_on_association(association) | |
@klass = klass |
To install a composer package globally, you run the usual require command, but with the addition of the global modifier. So to install PHPUnit, you would run:
$ composer global require phpunit/phpunit
$ composer global require phpunit/dbunit
$ composer global require phing/phing
$ composer global require phpdocumentor/phpdocumentor
$ composer global require sebastian/phpcpd
React now supports the use of ES6 classes as an alternative to React.createClass()
.
React's concept of Mixins, however, doesn't have a corollary when using ES6 classes. This left the community without an established pattern for code that both handles cross-cutting concerns and requires access to Component Life Cycle Methods.
In this gist, @sebmarkbage proposed an alternative pattern to React mixins: decorate components with a wrapping "higher order" component that handles whatever lifecycle methods it needs to and then invokes the wrapped component in its render()
method, passing through props
.
While a viable solution, this has a few drawbacks:
- There's no way for the child component to override functionality defined on the higher order component.
import { Component } from "React"; | |
export var Enhance = ComposedComponent => class extends Component { | |
constructor() { | |
this.state = { data: null }; | |
} | |
componentDidMount() { | |
this.setState({ data: 'Hello' }); | |
} | |
render() { |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
gem 'kaminari' | |
gem 'ransack' |
# Dealing with namespaces in Nokogiri. | |
# | |
# First thing you must do is abandon what you're used to with Builder, | |
# namespaces aren't just attributes on an element, they uniquely identify | |
# what sort of element you are building and, as such, you are better off | |
# specifying them manually. | |
# | |
# The key here is accessing the Nokogiri::XML::Element being built with | |
# b.parent, then you can set the namespace (distinguished by an element | |
# with a prefix such as "soap12:Envelope") or add a default namespace |