Skip to content

Instantly share code, notes, and snippets.

View ricardo-melo-martins's full-sized avatar
🤓
Available for hard work

⚡RMM⚡ ricardo-melo-martins

🤓
Available for hard work
View GitHub Profile
@ricardo-melo-martins
ricardo-melo-martins / typescript-inspiring-laravel-console.md
Last active February 23, 2024 04:12
Typescript - Inspiration quote to console similar Laravel
@ricardo-melo-martins
ricardo-melo-martins / setting.md
Last active February 22, 2024 19:42
VScode my Dark settings for js typescript php python html

My configs for vscode

{
  "editor.insertSpaces": false,
  "editor.wordWrap": "off",
  "editor.formatOnPaste": false,
  "editor.formatOnSave": false,
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": "explicit"
@ricardo-melo-martins
ricardo-melo-martins / typeorm-package-json.md
Last active February 22, 2024 16:35
Typeorm commands on package

Exemplo de uso do TypeOrm no package.json

// package.json
...
"scripts": {
    "typeorm": "typeorm-ts-node-commonjs",
    "typeorm:db": "npm run typeorm -- -d=config/data-source",
    "typeorm:show": "npm run typeorm -- version && npm run migrate:show",
 "entity:create": "npm run typeorm -- entity:create",
@ricardo-melo-martins
ricardo-melo-martins / my.md
Last active February 23, 2024 00:33
Editorconfig - my common config
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
@ricardo-melo-martins
ricardo-melo-martins / 1.connection.md
Last active February 21, 2024 15:50
Php PDO mysql connect
// docker sakila database example in github.com/ricardo-melo-martins/docker

$config = [
    'type'=>'mysql',
    'hostname'=>'localhost',
    'database'=>'sakila',
 'username'=>'sakila',
@ricardo-melo-martins
ricardo-melo-martins / 1.install-flask.md
Last active September 1, 2023 14:09
Python restful api created with Flask 2.3.x
<?php
$awesome = "Super Awesome!";
$result = strpos ( $awesome, G );
if ($result === false) {
echo 'Not found';
} else {
echo 'Found at position ' . $result;
}
#result: Not found