Skip to content

Instantly share code, notes, and snippets.

View leohmoraes's full-sized avatar
🏠
Working/Learning and Hackathon from home

Léo Moraes leohmoraes

🏠
Working/Learning and Hackathon from home
View GitHub Profile
@leohmoraes
leohmoraes / .. Modulo01-Video06-ESLint, Prettier e EditorConfig.md
Last active September 25, 2023 14:22
Rocketseat - Modulo 02 - Video 06:ESLint, Prettier e EditorConfig

INSTALACAO

yarn add eslint -D

RUN

yarn eslint --init
    3 > To check syntax, find problems, and enforce code style
    2 > Javascript modules (import/export)
    3 > None of these

2 > Apenas NODE

@leohmoraes
leohmoraes / bitbucket_dark.css
Created December 1, 2022 18:29 — forked from peterk87/bitbucket_dark.css
CSS: bitbucket.org dark theme
/*bitbucket.org dark css theme*/
body, aside {
background: #222 !important;
background-color: #222 !important;
color: #bbb !important;
}
h1, h2, h3, h4, h5, span {
background-color: transparent !important;
color: #FFC963 !important;
@leohmoraes
leohmoraes / laravel-tips.markdown
Created December 5, 2017 19:21 — forked from nickdenardis/laravel-tips.markdown
Tips on using Laravel

Resources

https://github.com/eightygrit/deploy-laravel/blob/master/deploy-laravel.z.sh
https://github.com/onigoetz/deployer
https://gist.github.com/purwandi/4110547
https://gist.github.com/chipotle/5506641

Add Sublime Text 2 to the CLI

sudo ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /usr/bin/subl

Use MAMP PHP CLI

@leohmoraes
leohmoraes / readme Desafio.md
Last active February 16, 2022 16:05
Desafio Lojacorr

Problema

Existem X casas à venda. Juntas essas casas valem I reais. Você tem um orçamento de B reais para gastar.

Qual o maior número de casas que você pode comprar com o orçamento?

OBS: Quantidade de casas e valor podem ser definidos da maneira que desejar, é possivel também efetuar pesquisas durante o desenvolvimento

Output

@leohmoraes
leohmoraes / nginx.conf
Created February 12, 2022 18:57 — forked from schakko/nginx.conf
Adjusted nginx.conf to make Laravel 8 apps with PHP 8.0 features runnable on Azure App Service
server {
# adjusted nginx.conf to make Laravel 8 apps with PHP 8.0 features runnable on Azure App Service
# @see https://laravel.com/docs/8.x/deployment
listen 8080;
listen [::]:8080;
root /home/site/wwwroot/public;
index index.php;
server_name example.com www.example.com;
location / {
@leohmoraes
leohmoraes / secret-santa.rb
Created December 8, 2021 00:34 — forked from gacha/secret-santa.rb
Secret santa script for christmas
#!/usr/bin/env ruby
require 'timeout'
members = %w(Gatis Jānis Anna Ilze Ieva Kaspars Juris Klāvs Pēteris)
takers = []
givers = []
exceptions = { 'Gatis' => 'Jānis'}
begin
Timeout::timeout(2) do
@leohmoraes
leohmoraes / Dockerfile
Created December 5, 2021 20:03
docker node next jest
# Install dependencies only when needed
FROM node:lts-alpine AS deps
WORKDIR /opt/app
COPY package.json yarn.lock ./
RUN yarn install --frozen-lockfile
# Rebuild the source code only when needed
# This is where because may be the case that you would try
# to build the app based on some `X_TAG` in my case (Git commit hash)
# Source: https://gist.github.com/d2f36b05bf959e5fc91497ea3f0dceb3
##########################################################
# Should We Replace Docker Desktop With Rancher Desktop? #
# https://youtu.be/bYVfCp9dRTE #
##########################################################
# Referenced videos:
# - Free Docker Desktop Alternative For Mac And Windows: https://youtu.be/LGNEG-t96eE
# - K3d - How to run Kubernetes cluster locally using Rancher k3s: https://youtu.be/mCesuGk-Fks
@leohmoraes
leohmoraes / gist:a028fbac9d198674caa27d574a70365b
Created September 21, 2021 00:43 — forked from mhawksey/gist:1442370
Google Apps Script to read JSON and write to sheet
function getJSON(aUrl,sheetname) {
//var sheetname = "test";
//var aUrl = "http://pipes.yahoo.com/pipes/pipe.run?_id=286bbb1d8d30f65b54173b3b752fa4d9&_render=json";
var response = UrlFetchApp.fetch(aUrl); // get feed
var dataAll = JSON.parse(response.getContentText()); //
var data = dataAll.value.items;
for (i in data){
data[i].pubDate = new Date(data[i].pubDate);
data[i].start = data[i].pubDate;
}
@leohmoraes
leohmoraes / flutter_splashscreen.dart
Created July 21, 2021 00:35 — forked from hariprasadms/flutter_splashscreen.dart
A example code to show how splash screen can added to flutter apps
import 'package:fire_table_demo/home_page/landingpage.dart';
import 'package:flutter/material.dart';
import 'package:splash_screen_view/SplashScreenView.dart';
class SplashScreenDemo extends StatefulWidget {
SplashScreenDemo({Key key}) : super(key: key);
@override
_SplashScreenDemoState createState() => _SplashScreenDemoState();
}