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 'aws-sdk-s3' | |
require 'uri' | |
class S3Downloader | |
def initialize(region:, access_key_id:, secret_access_key:, bucket_name:) | |
@s3 = Aws::S3::Client.new( | |
region: region, | |
access_key_id: access_key_id, | |
secret_access_key: secret_access_key | |
) |
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 ContractorObject | |
attr_accessor :activity, :contractor_id | |
def initialize(activity, contractor_id) | |
raise ArgumentError, "Activity must not be empty" if activity.nil? || activity.strip.empty? | |
@contractor_id = contractor_id | |
@activity = activity | |
end | |
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
class MetaContractorObject | |
VALID_SUB_CATEGORIES = ['PERMANENTE', 'ESPORÁDICO', 'HABITUAL'].freeze | |
attr_accessor :sub_category, :meta_contractor_id | |
def initialize(meta_contractor_id, sub_category) | |
raise ArgumentError, "Invalid sub_category: #{sub_category}. Must be one of: #{VALID_SUB_CATEGORIES.join(', ')}" unless VALID_SUB_CATEGORIES.include?(sub_category) | |
@meta_contractor_id = meta_contractor_id | |
@sub_category = sub_category |
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
1. Instalar el paquete de Intercom para PHP | |
Primero, instala el paquete oficial de Intercom para PHP utilizando Composer: | |
<dl> | |
bash | |
composer require intercom/intercom-php | |
</dl> |
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
if [ "$#" -ne 1 ]; then | |
echo "Usage: $0 [personal|work1|work2]" | |
exit 1 | |
fi | |
if [ "$1" == "personal" ]; then | |
git config --global user.name "Tu Nombre" | |
git config --global user.email "[email protected]" | |
elif [ "$1" == "chile" ]; then | |
git config --global user.name "Tu Nombre Trabajo 1" |
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 DeactivateInactiveContractorWorkers | |
def perform | |
Site.where(app: 'mall').includes(staffing_contractors: :non_archived_jobs).each do |site| | |
next unless site.contractor_worker_expiration_days | |
@expiration_days = site.contractor_worker_expiration_days | |
site.staffing_contractors do |contractor| | |
next if has_active_job?(contractor) | |
active_contractor_workers = contractor.alive_contractor_workers |
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 from 'react' | |
import User from '../User' | |
function Welcome() { | |
return ( | |
<div className="Welcome"> | |
Welcome page rendered after login |
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
ContractorWorker.all.each do |worker| | |
worker_status = if worker.banished_at? | |
ContractorWorker::Status::DISABLED | |
elsif !worker.approved? | |
ContractorWorker::Status::REJECTED | |
elsif worker.approved? && worker.without_access | |
ContractorWorker::Status::INCOMPLETE | |
elsif worker.approved? && !worker.without_access | |
ContractorWorker::Status::APPROVED |
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, { useState } from 'react'; | |
import { slice } from 'lodash'; | |
import { ArrowRightOutlined } from '@ant-design/icons'; | |
import { | |
Button, | |
Col, | |
Divider, | |
Row, | |
Typography, | |
} from 'antd'; |
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
# Description | |
Please include a summary of the change and which issue is fixed or feature, include relevant context and List any dependencies that are required for this change. | |
Feature/Fix # [(Referenced card)](URL) | |
## Type of change | |
- [ ] Bug fix (non-breaking change which fixes an issue) | |
- [ ] New feature (non-breaking change which adds functionality) |
NewerOlder