This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<TextInput | |
type="text" | |
id="First name" | |
placeholder="Enter first name" | |
{...register('firstName')} | |
/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
service: social-feeds | |
provider: | |
name: aws | |
runtime: nodejs8.10 | |
stage: dev | |
region: eu-west-1 | |
environment: | |
SOCIAL_FEED_TWITTER_TABLE: "twitter-feed-${self:service}-${opt:stage, self:provider.stage}" | |
iamRoleStatements: | |
- Effect: Allow |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
import { createStore, applyMiddleware, combineReducers, compose } from 'redux'; | |
import Provider from 'react-redux'; | |
import thunk from 'redux-thunk'; | |
import TodoList from '../containers/TodoList'; | |
import reducers from '../reducers'; | |
import init from '../actions/ListActions'; | |
class TodoAppClinet extends Component { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- begin olark code --> | |
<script data-cfasync="false" type='text/javascript'> | |
<% unless I18n.locale == :sv -%> | |
olark.configure('locale.feedback_survey_question_chat_text', 'How satisfied were you with this chat?'); | |
olark.configure('locale.feedback_survey_question_operator_intelligence_text', 'How knowledgeable was the chat agent?'); | |
olark.configure('locale.feedback_survey_question_operator_speed_text', 'How responsive was the chat agent?'); | |
olark.configure('locale.feedback_survey_question_operator_attitude_text', 'How friendly was the chat agent?'); | |
olark.configure('locale.feedback_survey_question_1_text', 'Question 1 of 5'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Country 1a": { | |
"Bank 1a": { | |
"Metric Level 1a": { | |
"Metric Level 2a": { | |
"Metric Level 3a": { | |
"Period 1": 0.94, | |
"Period 2 / % change over Period 2": -1.83, | |
"Period 3 / % change over Period 3": 1.83 | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'json' | |
a=[1,2,3,4,5,6,7] | |
h={} | |
a.each do|i| | |
if h.keys.empty? | |
h[i]='rays' | |
else | |
h[i]=h.to_json | |
h.shift | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Press ctrl + v to select first character in first line and press l to select more | |
Press j to extend the visual block in multiple lines | |
Press c to go in to inset mode and type words(what you want to insert) | |
Press Esc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Comment < ActiveRecord::Base | |
include Attachable, AdminPanel, | |
Subscribable, Activitable | |
belongs_to :commentable, polymorphic: true | |
belongs_to :creator, class_name: User | |
validates :content, presence: true | |
validates :commentable, presence: true | |
validates :creator, presence: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'spec_helper' | |
describe MessageNotification do | |
it_behaves_like 'notification' do | |
let(:subject) { create(:message) } | |
let(:message) { subject } | |
let(:project) { message.project } | |
let(:notification) { MessageNotification.new(message) } | |
let(:text) { %{#{message.creator.name} posted a message "#{message.subject}" #{Rails.application.routes.url_helpers.account_project_message_url(project.account, project, message)}} } | |
let(:activity_text) { I18n.t('activity.message_create') } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def solution(x,y,d) | |
sum = x+d | |
i=1 | |
while true | |
if sum >= y | |
break | |
else | |
sum+= d | |
i+=1 | |
end |
NewerOlder