Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View DanielHe4rt's full-sized avatar
💜
He4rt Developers Evangelist

Daniel Reis DanielHe4rt

💜
He4rt Developers Evangelist
View GitHub Profile
@DanielHe4rt
DanielHe4rt / ACID.md
Created July 3, 2023 18:15
ACID Database Studies
  • Acronym
    • Atomicity
      • One operation per time, independent on which one (INSERT, UPDATE, DELETE etc), preventing any error to be persisted. Basically: every piece of your query should be ok "atomically speaking" to be considered a successful operation.
      • If any part of the operation fails, it will roll everything back.
    • Consistency
      • Let you only write data that is predefined previously. Like a table modeling with specifics data types, constraints, cascades, indexes or any other modeled clause.
    • Isolation
  • Each operation per time without interfere in other operations;
@DanielHe4rt
DanielHe4rt / rust-uuid.rs
Last active April 19, 2023 16:08
Why this doesn't work plz I just want a struct to work in my example
// on the second example i know that i need to use ValueList (from scylla) but it stills crashes on Uuid problem.
use anyhow::Result;
use chrono::{NaiveDate, Utc};
use scylla::{FromRow, Session, SessionBuilder, ValueList};
use serde::{Deserialize, Serialize};
use std::time::Duration as TimeoutDuration;
use uuid::Uuid;
#[derive(Debug)]
@DanielHe4rt
DanielHe4rt / readme.md
Created March 31, 2023 14:45 — forked from ijpatricio/gist:423f02e94655e2164a1fd39930a35a41
Odisseia Web com Laravel
@DanielHe4rt
DanielHe4rt / docker-compose.yaml
Created March 12, 2023 19:05
Todo list foda yaml
version: '3.8'
services:
monstrously-todolist-scylla1:
image: scylladb/scylla
container_name: monstrously-todolist-scylla1
command: --smp 1
environment:
- "SCYLLA_JMX_ADDR=-ja 0.0.0.0"
- "SCYLLA_JMX_REMOTE=-r"
@DanielHe4rt
DanielHe4rt / vue3.md
Last active November 20, 2022 02:56
Estudos de Vue3

Estudo VueJS

Diferenças do Vue2 pro Vue3

  • Como ele é criado (scaffold)
  • Multiplos componentes raiz no mesmo arquivo
  • Fragments (Estados) -> estudar mais
  • Nova possibilidade de fugir do Options API (n gostei)
  • Beleza já entendi que vo te q aprender esse tal de Composition API
  • Novo jeito de acessar os ciclos de vida de um hook onMounted()
@DanielHe4rt
DanielHe4rt / lula.txt
Created October 30, 2022 20:55
Rola do Lula
Vai passando a ROLA DE LULA! COMPARTILHE ATÉ CHEGAR NO CU DE BOLSONARO!
⭐13
13 13 13
13 13 13 13
  13 13 13 13
    13 13 13 13
     13 13 13 13
       13 13 13 13
        13 13 13 13
@DanielHe4rt
DanielHe4rt / bootstrap5.html
Created May 8, 2022 19:42
Portfólio HTML/BS5
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="https://bootswatch.com/5/pulse/bootstrap.min.css">
<!-- <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" -->
@DanielHe4rt
DanielHe4rt / TwitchService.php
Created January 3, 2022 21:58
Twitch Service
<?php
namespace App\Services;
use App\Contracts\OAuthServiceContract;
use GuzzleHttp\Client;
use GuzzleHttp\Exception\GuzzleException;
use Illuminate\Support\Facades\Log;
@DanielHe4rt
DanielHe4rt / README.MD
Created September 15, 2021 23:06
Minha Home do Github
@DanielHe4rt
DanielHe4rt / bot.php
Created September 15, 2021 17:58
Zup Twitter Bot
<?php
// Generated by curl-to-PHP: http://incarnate.github.io/curl-to-php/
$ch = curl_init();
$tweetId = $argv[1];
$uri = 'https://twitter.com/i/api/graphql/MFRcu86F8zXkX7810z6sGA/Retweeters?variables=%7B%22tweetId%22%3A%22' . $tweetId . '%22%2C%22count%22%3A80%2C%22withTweetQuoteCount%22%3Afalse%2C%22includePromotedContent%22%3Atrue%2C%22withSuperFollowsUserFields%22%3Afalse%2C%22withUserResults%22%3Atrue%2C%22withBirdwatchPivots%22%3Afalse%2C%22withReactionsMetadata%22%3Afalse%2C%22withReactionsPerspective%22%3Afalse%2C%22withSuperFollowsTweetFields%22%3Afalse%7D';
curl_setopt($ch, CURLOPT_URL, $uri);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);