Skip to content

Instantly share code, notes, and snippets.

View vedovelli's full-sized avatar
💭
🚀

Fábio Vedovelli vedovelli

💭
🚀
View GitHub Profile
# Salvar num arquivo ~/encode.sh, conceder direito de execução e
# executar desta forma (adaptar nomes de diretórios e arquivos para seu caso):
# $ ~/encode.sh ~/Video/bigFile.mp4 ~/Video/smallFile.mp4
ffmpeg -i "$1" -vcodec h264 -acodec aac "$2"
AxiosError: Request failed with status code 400
at settle (/Users/vedovelli/Shamrock/app-new/node_modules/axios/lib/core/settle.js:19:12)
at IncomingMessage.handleStreamEnd (/Users/vedovelli/Shamrock/app-new/node_modules/axios/lib/adapters/http.js:505:11)
at IncomingMessage.emit (node:events:539:35)
at endReadableNT (node:internal/streams/readable:1345:12)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
code: 'ERR_BAD_REQUEST',
config: {
transitional: {
silentJSONParsing: true,
@vedovelli
vedovelli / db.server.ts
Created September 23, 2022 18:37
Remix Prisma DB server
// @ts-nocheck
import { PrismaClient } from '@prisma/client';
let db: PrismaClient;
declare global {
let __db: PrismaClient | undefined;
}
// this is needed because in development we don't want to restart
2gua.rainbow-brackets
adampalhazi.vscode-debug-arrow-function
alexcvzz.vscode-sqlite
alfnielsen.vsc-organize-imports
aliariff.auto-add-brackets
andys8.jest-snippets
antfu.iconify
antfu.vite
apollographql.vscode-apollo
arcticicestudio.nord-visual-studio-code
{
"git.enableSmartCommit": true,
"workbench.editor.decorations.colors": true,
"editor.minimap.enabled": false,
"editor.accessibilitySupport": "off",
"zenMode.hideLineNumbers": false,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"tailwindCSS.includeLanguages": {
"typescriptreact": "html",
"plaintext": "html",
import type { LoaderFunction, ActionFunction } from "remix";
import { useLoaderData, useFetcher } from "remix";
import invariant from "tiny-invariant";
import cuid from "cuid";
import React from "react";
import type { Task, User } from "@prisma/client";
import { requireAuthSession } from "~/util/magic-auth";
import { ensureUserAccount } from "~/util/account";
import { placeCaretAtEnd } from "~/components/range";
import { getBacklog } from "~/models/backlog";
@vedovelli
vedovelli / Products.js
Last active November 29, 2021 07:25
Screencast Storybook
import { http } from "../../service/api";
import { Card } from "./Card";
import { Header, Spinner } from "../../components";
import { useQuery } from "react-query";
export default function Products() {
const { isLoading, isError, data } = useQuery(
"todos",
() => http.get("/products").then(({ data }) => data.products) // http contains baseURL with `/api`
);
@vedovelli
vedovelli / Products.js
Created November 29, 2021 07:22
Products.js
import { http } from "../../service/api";
import { Card } from "./Card";
import { Header, Spinner } from "../../components";
import { useQuery } from "react-query";
export default function Products() {
const { isLoading, isError, data } = useQuery(
"todos",
() => http.get("/products").then(({ data }) => data.products) // http container baseURL with `/api`
);
import {mount, createLocalVue} from '@vue/test-utils';
import Vuetify from 'vuetify';
export function factory (component, propsData) {
const vuetify = new Vuetify();
const localVue = createLocalVue();
return mount(component, {
propsData,
localVue,
{
"folders": [
{
"path": "."
}
],
"settings": {
"workbench.colorCustomizations": {
"titleBar.activeBackground": "#007c27",
"titleBar.activeForeground": "#ffffff",