Skip to content

Instantly share code, notes, and snippets.

View bloodf's full-sized avatar
:shipit:
Coding...

Heitor Ramon Ribeiro bloodf

:shipit:
Coding...
View GitHub Profile
@bloodf
bloodf / shareSpotifySongOnSlack.sh
Last active May 1, 2020 15:55
Share Spotify Song on Slack
#!/bin/bash
# From Here https://api.slack.com/custom-integrations/legacy-tokens
SLACKTOKEN=""
trap onexit INT
function reset() {
echo 'Resetting Slack Status'
curl -s -d "payload=$json" "https://slack.com/api/users.profile.set?token="$SLACKTOKEN"&profile=%7B%22status_text%22%3A%22%22%2C%22status_emoji%22%3A%22%22%7D" > /dev/null
}
@bloodf
bloodf / 0-JetBrains-IDE-Performance-Config.md
Last active July 6, 2023 13:49
JetBrains IDE Performance Config

JetBrains IDE Performance Config

High Performance Configuration for Jetbrains IDEs [IntelliJ, WebStorm, etc..]

Motivation

Once you step into the realm of multi-project development, large scale dev, or just have to have like 6 IDE's open. You really start to feel a performance hit on jetbrains IDEs.

This configuration aims to give at least 10x performance increases across the board.

Goals

@bloodf
bloodf / usePagination.ts
Created July 11, 2022 13:26
Simple pagination for Vue 3
export const usePagination = ({
total, // Total of elements in the Query
numberOfElements = 12, // Number of elements per Page
pagesToDisplay = 6, // Pages to be displayed in the component
currentPage = 1, // Current Page
pageLinkRule = (pageNumber) => { // Function to generate the links
return `/page/${pageNumber}`;
},
}: {
total: number;
Compiling international-account-ext v1.0.0 (/Users/heitor/Developer/github.com/ernesta-tech/shopify-apps/extensions/custom-size)
error: Failed to generate GraphQLQuery impl: Could not find file with path: /Users/heitor/Developer/github.com/ernesta-tech/shopify-apps/extensions/custom-size/./schema.graphql
Hint: file paths in the GraphQLQuery attribute are relative to the project root (location of the Cargo.toml). Example: query_path = "src/my_query.graphql".
--> src/main.rs:7:1
|
7 | / generate_types!(
8 | | query_path = "./input.graphql",
9 | | schema_path = "./schema.graphql"
10 | | );
error: Failed to generate GraphQLQuery impl: Could not find file with path: /Users/heitor/Developer/github.com/ernesta-tech/shopify-apps/extensions/custom-size/../schema.graphql
Hint: file paths in the GraphQLQuery attribute are relative to the project root (location of the Cargo.toml). Example: query_path = "src/my_query.graphql".
--> src/main.rs:5:1
|
5 | / generate_types!(
6 | | query_path = "../input.graphql",
7 | | schema_path = "../schema.graphql"
8 | | );
| |_^