This file contains hidden or 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
| MAP = { | |
| 1 => ['I', 'V', 'X'], | |
| 2 => ['X', 'L', 'C'], | |
| 3 => ['C', 'D', 'M'], | |
| 4 => ['M', 'M', 'M'] | |
| } | |
| def to_roman(numeral) | |
| roman_numeral = '' |
This file contains hidden or 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 { ActivityIndicator } from 'react-native'; | |
| import NetInfo from '@react-native-community/netinfo'; | |
| import { connect } from 'react-redux'; | |
| import { setInternetStatus } from 'actions'; | |
| import { showToast } from '../utils/Library'; | |
| import PubSub from 'pubsub-js'; | |
| import { MESSAGE_TOPICS, Locales } from 'utils'; | |
| import { SemiBoldText } from 'components/common'; | |
| import { TextStyle, Row } from 'styles'; |
This file contains hidden or 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 axios from 'axios'; | |
| import configureStore from './Store'; | |
| const { store } = configureStore(); | |
| const instance = axios.create({ | |
| headers: { | |
| Accept: 'application/json', | |
| 'Content-Type': 'application/json', | |
| } |
This file contains hidden or 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 { Component } from 'react'; | |
| import { AppState } from 'react-native'; | |
| import { connect } from 'react-redux'; | |
| import { recordSomething } from 'some-component'; | |
| import { recordSomethingElse } from 'some-other-component'; | |
| import { storeSessionData } from 'redux/actions/sessions'; | |
| import * as Sentry from '@sentry/react-native'; | |
| import { navigator } from 'utils'; | |
| import { chatActions } from 'actions'; |
This file contains hidden or 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
| # frozen_string_literal: true | |
| class BaseObserver < ActiveRecord::Observer | |
| def create?(resource) | |
| resource.send(:transaction_include_any_action?, [:create]) | |
| end | |
| def deleted?(resource) | |
| resource.send(:transaction_include_any_action?, [:destroy]) | |
| end |
This file contains hidden or 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
| # frozen_string_literal: true | |
| class ContactStorageWorker | |
| include Sidekiq::Worker | |
| sidekiq_options retry: false | |
| attr_accessor :user_id, :contact_params | |
| def perform(contact_params, user_id) | |
| @user_id = user_id |
This file contains hidden or 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
| # frozen_string_literal: true | |
| # For abstracting out updating approved users sheet | |
| class GoogleSheets::Users | |
| SHEET_NAME = 'users' | |
| QUEUE_NAME = 'google_sheet' | |
| include Sidekiq::Worker | |
| sidekiq_options queue: QUEUE_NAME | |
| sidekiq_options lock: :until_and_while_executing |
This file contains hidden or 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
| # frozen_string_literal: true | |
| # == Schema Information | |
| # | |
| # Table name: images | |
| # | |
| # id :bigint not null, primary key | |
| # deleted_at :datetime indexed | |
| # height :decimal(, ) | |
| # image :string |
This file contains hidden or 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
| server { | |
| server_name xyz.com; | |
| root /home/ubuntu/www; | |
| large_client_header_buffers 4 16k; | |
| client_max_body_size 4G; | |
| keepalive_timeout 10; | |
| gzip_static on; |
This file contains hidden or 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
| # encoding: utf-8 | |
| Model.new(:producion_backup, 'Description for producion_backup') do | |
| archive :configs do |archive| | |
| archive.add "/home/ubuntu/projects/api/shared/config/" | |
| archive.add '/etc/nginx/' | |
| end | |
| database PostgreSQL do |db| | |
| db.name = "db_name" |
NewerOlder