Skip to content

Instantly share code, notes, and snippets.

View lucalves's full-sized avatar

Lucas Alves lucalves

View GitHub Profile
@lucalves
lucalves / xcrun_simctl_cheatsheet.md
Last active February 21, 2024 03:30
CheatSheet to manage iOS simulators through simctl.

Managing iOS Simulators

List all simulators created

$ xcrun simctl list --json

Delete old and unavailable simulators

$ xcrun simctl delete unavailable

Nest.js Cheatsheet

Nest CLI

  • npm i -g @nestjs/cli

Packages

  • yarn add class-validator class-transformer
  • yarn add @nestjs/mapped-types
"lint-staged": {
"src/**/*.{js,jsx,ts,tsx,json}": [
"prettier src --write",
"eslint src --fix",
"git add"
]
}
@lucalves
lucalves / common-regex.md
Last active June 22, 2022 17:57
List of most common REGEX expressions (validated)

Use https://regex101.com/ to validate the expressions.

  1. Simple numbers only (no decimal and no fractions)
^(\d+)$
  1. Decimal numbers
[
{
"id": "Hsi0nPw7nZQ"
},
{
"id": "U9trUYVrI20"
},
{
"id": "9kY_e0z1rvA"
},
@lucalves
lucalves / gist:cff1baa63a45f97a1a7a4d724eebb6c4
Created October 5, 2021 17:03
All Media queries for resolutions
/* (320x480) iPhone (Original, 3G, 3GS) */
@media only screen and (min-device-width: 320px) and (max-device-width: 480px) {
/* insert styles here */
}
/* (320x480) Smartphone, Portrait */
@media only screen and (device-width: 320px) and (orientation: portrait) {
/* insert styles here */
}
@lucalves
lucalves / settings.json
Last active June 22, 2022 14:40
Visual Studio Code Configuration
{
// Configurações da fonte FiraCode
"editor.fontFamily": "Fira Code",
"editor.fontLigatures": true,
// Demais configurações
"workbench.colorTheme": "Omni",
"workbench.iconTheme": "material-icon-theme",
"workbench.startupEditor": "newUntitledFile",
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:splashscreen/splashscreen.dart';
import 'home_screen.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:splashscreen/splashscreen.dart';
import 'home_screen.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
import 'package:flutter/material.dart';
import 'SegundaActivity.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Funcionamento do botão voltar',