Design a modular and maintainable architecture for a calendar component suitable for a React Native application, focusing on architectural planning rather than full implementation. Optionally, create a simple working monthly calendar that demonstrates the architecture in action.
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
| const express = require('express'); | |
| const crypto = require('crypto'); | |
| const axios = require('axios'); | |
| require('dotenv/config'); | |
| const app = express(); | |
| // Capture the raw body for signature verification. | |
| app.use(express.json({ | |
| verify: (req, res, buf, encoding) => { |
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
| { | |
| "buildings": { | |
| "radiant": { | |
| "dota_goodguys_tower1_top": { | |
| "health": 1771, | |
| "max_health": 1800 | |
| }, | |
| "dota_goodguys_tower2_top": { | |
| "health": 2500, | |
| "max_health": 2500 |
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
| { | |
| "match": { | |
| "server_steam_id": 90137856241120259, | |
| "matchid": 5564510148, | |
| "timestamp": 701, | |
| "game_time": 537, | |
| "game_mode": 21, | |
| "league_id": 11751, | |
| "league_node_id": 0, | |
| "game_state": 5 |
використовуючи лише Rack(http://rack.github.io) написати простий веб додаток, який розбирає набір вхідних параметрів в GET запиті(приклад: http://localhost:9292/?field1=value1&field2=value2&field3=value3) та повертає їх в веб браузер у вигляді таблиці:
| key | value |
|---|---|
| field1 | value1 |
| field2 | value2 |
| field3 | value3 |
(пояснення, як працювати з Rack можна знайти тут: https://gist.github.com/markbates/4240848)
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
| class Test | |
| include Benchmark | |
| def a | |
| sleep 10 | |
| p 'a' | |
| end | |
| def b | |
| p 'b' | |
| 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
| require "minitest/autorun" | |
| class Rtest < Minitest::Test | |
| def setup | |
| @cars = 100.times.inject([]) do |arr, i| arr.push( | |
| id: i, | |
| price: rand(1000..25000), | |
| color: [:red, :blue, :white, :yellow, :black][rand(5)] | |
| ) | |
| end |
- A URL identifies a resource.
- URLs should include nouns, not verbs.
- Use plural nouns only for consistency (no singular nouns).
- Use HTTP verbs (GET, POST, PUT, DELETE) to operate on the collections and elements.
- You shouldn’t need to go deeper than resource/identifier/resource.
- Put the version number at the base of your URL, for example http://example.com/v1/path/to/resource.
- URL v. header:
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
| AllCops: | |
| TargetRubyVersion: 2.3 | |
| Include: | |
| - Rakefile | |
| - config.ru | |
| - lib/**/*.rake | |
| Exclude: | |
| - db/schema.rb | |
| - logs |
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
| # | |
| # Sidekiq auto start using systemd unit file for Ubuntu 16.04 | |
| # | |
| # Put this in /lib/systemd/system (Ubuntu). | |
| # Run: | |
| # 1. systemctl enable sidekiq (to enable sidekiq service) | |
| # 2. systemctl {start,stop,restart} sidekiq (to start sidekiq service) | |
| # | |
| # This file corresponds to a single Sidekiq process. Add multiple copies | |
| # to run multiple processes (sidekiq-1, sidekiq-2, etc). |
NewerOlder