Skip to content

Instantly share code, notes, and snippets.

View luciotbc's full-sized avatar
:shipit:

Lucio Charallo luciotbc

:shipit:
View GitHub Profile
@luciotbc
luciotbc / sidekiq_hacks.md
Last active February 1, 2023 15:29
sidekiq hacks

Sidekiq

Infra

Parando o sidekiq usando o rails (recomendado)

ps -ef | grep sidekiq | grep busy | grep -v grep | awk '{print $2}' > tmp/sidekiq.pid
cat tmp/sidekiq.pid
bundle exec sidekiqctl stop tmp/sidekiq.pid
@luciotbc
luciotbc / History|-1088d338|entries.json
Last active May 5, 2022 19:41
Visual Studio Code Settings Sync Gist
{"version":1,"resource":"file:///home/lc/work/cepeti-backend/app/graphql/types/models/specialty_type.rb","entries":[{"id":"yP8n.rb","timestamp":1650402679430},{"id":"3zep.rb","timestamp":1650402921948}]}
@luciotbc
luciotbc / BestPracticesForReact04_ExampleApplication.jsx
Created October 23, 2018 19:23
BestPracticesForReact04_ExampleApplication.jsx
import React from 'react';
const ExampleApplication = () => (
<div>
<Header />
<React.StrictMode>
<div>
<ComponentOne />
<ComponentTwo />
</div>
@luciotbc
luciotbc / BestPracticesForReact04_ListItens.jsx
Last active October 23, 2018 19:17
BestPracticesForReact04_ListItens.jsx
const listItems = numbers.map((number) =>
<li key={number.toString()}>{number}</li>
);
@luciotbc
luciotbc / BestPracticesForReact03_RenderExamples.jsx
Created October 23, 2018 18:47
BestPracticesForReact03_RenderExamples.jsx
// Bad
render() {
return <Welcome className="class">
<child />
</Welcome>;
}
// Good
render() {
return (
@luciotbc
luciotbc / BestPracticesForReact02_SampleComponent.jsx
Last active October 23, 2018 18:42
BestPracticesForReact02_SampleComponent.jsx
export default class SampleComponent extends React.Component<Props, State> {
// 1. Constructor
constructor(props) {
}
// React life cycle methods
componentDidCatch(){
}
@luciotbc
luciotbc / BestPracticesForReact01_Username.jsx
Created October 23, 2018 18:30
Best practices for React
const Username = ({ username }) => <p> The logged user is: {username} </p>