Skip to content

Instantly share code, notes, and snippets.

View esshka's full-sized avatar
🏠
Working from home

Eugeny esshka

🏠
Working from home
View GitHub Profile
import React, { PropTypes } from 'react';
export default (thunks = {}) => (Component) => {
return class extends React.Component {
static propTypes = {
dispatch: PropTypes.func,
};
static defaultProps = {
"<html><head><meta charset=\"utf-8\"></head><body><script>window.rbzns = {fiftyeightkb: 43200000, days_in_week : 1};</script><script src=\"//d1a702rd0dylue.cloudfront.net/js/sugarman/v7/flat.js\"></script><script>rbzns.challdomain=\"www.redstarfantasy.ru\"; rbzns.ctrbg=\"EwFkTSWOmtfNj3B8/YlUk1cWpfgdaw9L5H8gbmxt5+22tFsp4XQr4DZbPThhBc5OytNL+o96z6fJsmpWwwUuOEZFmdH2kn9Rd8XjdMc3XKgQ7gvOxvneQZ8vJ3Gpi5Degie9dsDtffMZYlBd5msg5uFmHf++xiA54zwW6sv4jEQ=\";rbzns.rbzreqid=\"fantasy65-rbzr131343634393433303432780296080efbaf77\"; winsocks(true);</script></body></html>\n"
const transferNodes =
transfers.map(tid =>
<TransferRow {...{
transfer: transfersById[tid],
key: `transfer-${tid}`,
toggleSelected: () => actions.toggleSelected(transfersById[tid]),
approveTransfer: () => actions.transferActionRequested(transfersById[tid], 'approve'),
cancelTransfer: () => actions.transferActionRequested(transfersById[tid], 'cancel'),
isLoading,
isSelected: some(selectedTransfers, stid => stid === tid)
import React, { Component } from 'react';
export default class CircleProgress extends Component {
static defaultProps = {
strokeWidth: 6,
strokeColor: '#3FC7FA',
trailWidth: 6,
trailColor: '#D9D9D9',
};
[101] pry(main)> h = {date: Date.parse("06.04.2016"), sourceCurrency: "USD", targetCurrency: "EUR"}
=> {:date=>Wed, 06 Apr 2016, :sourceCurrency=>"USD", :targetCurrency=>"EUR"}
[102] pry(main)> result = client.call(:get_currency_rates, message: { :getCurrencyRates => [h,h] })
class CurrencyRateRequestBeanContainer < WashOut::Type
type_name 'currencyRateRequestBean'
map :currencyRateRequest => {
date: :datetime,
sourceCurrency: :string,
targetCurrency: :string
}
end
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://v1.currency.integration.commons.tain.se" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soap-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" name="currency_rate_service_soap" targetNamespace="http://v1.currency.integration.commons.tain.se">
<types>
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://v1.currency.integration.commons.tain.se">
<xsd:complexType name="getCurrencyRates">
<xsd:sequence>
<xsd:element name="currencyRatesRequest" type="tns:currencyRateRequestBean"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="currencyRateRequestBean">
<xsd:sequence>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://v1.currency.integration.commons.tain.se" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soap-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" name="currency_rate_service_soap" targetNamespace="http://v1.currency.integration.commons.tain.se">
<types>
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://v1.currency.integration.commons.tain.se">
<xsd:complexType name="getCurrencyRates">
<xsd:sequence>
<xsd:element name="currencyRatesRequest" type="tns:currencyRateRequestBean"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="currencyRateRequestBean">
<xsd:sequence>
@esshka
esshka / react-testing-in-rails.diff
Created April 12, 2016 00:19 — forked from jakecraige/react-testing-in-rails.diff
Simple react component testing in rails + capybara
commit 074a79b95e66d999abe500051c5337805575ea3f
Author: Jake Craige <[email protected]>
Date: Tue Apr 7 10:14:29 2015 -0700
Add testing infastructure for React components
diff --git a/app/controllers/components_controller.rb b/app/controllers/components_controller.rb
new file mode 100644
index 0000000..4ffc308
--- /dev/null
@esshka
esshka / sc.js
Created March 21, 2016 01:06
simple carousel on react
state = {
offset: 0,
items: [],
itemsVisible: 4,
width: 800,
height: 100,
};
componentDidMount() {
this.setState({items: initialItems})