Skip to content

Instantly share code, notes, and snippets.

View brunocroh's full-sized avatar
:shipit:
Vim Wizard

Bruno Rodrigues brunocroh

:shipit:
Vim Wizard
View GitHub Profile
import React, {Dispatch, SetStateAction, useCallback, useRef, useState} from 'react';
import {Input, TamaguiElement, XStack} from 'tamagui';
import * as Clipboard from 'expo-clipboard';
import {Keyboard} from 'react-native';
type Props = {
setState: Dispatch<SetStateAction<string>>;
};
type Code = {
@brunocroh
brunocroh / progressBar.ts
Last active July 31, 2023 22:42
Youtube downloader
import cliProgress from 'cli-progress'
import colors from 'ansi-colors'
import stream from 'stream'
async function endDownload(promise: any) {
return new Promise((resolve, reject) => {
promise
.then(resolve)
.catch(reject)
})
// Logiops (Linux driver) configuration for Logitech MX Master 3.
// // Includes gestures, smartshift, DPI.
// // Tested on logid v0.2.3 - GNOME 3.38.4 on Zorin OS 16 Pro
// // What's working:
// // 1. Window snapping using Gesture button (Thumb)
// // 2. Forward Back Buttons
// // 3. Top button (Ratchet-Free wheel)
// // What's not working:
// // 1. Thumb scroll (H-scroll)
// // 2. Scroll button
type Usuario {
16 ¦ id: ID
15 ¦ name: String
14 ¦ photos: [ Photo ]
13 }
12
11 type Photo {
10 ¦ id: ID
9 ¦ likes: Int
8 }
@brunocroh
brunocroh / response
Created March 5, 2018 02:06
pokeapi
<!DOCTYPE html>
<!--[if lt IE 7]>
<html class="no-js ie6 oldie" lang="en-US">
<![endif]-->
<!--[if IE 7]>
<html class="no-js ie7 oldie" lang="en-US">
<![endif]-->
<!--[if IE 8]>
<html class="no-js ie8 oldie" lang="en-US">
<![endif]-->
@brunocroh
brunocroh / response
Created March 5, 2018 02:06
pokeapi
<!DOCTYPE html>
<!--[if lt IE 7]>
<html class="no-js ie6 oldie" lang="en-US">
<![endif]-->
<!--[if IE 7]>
<html class="no-js ie7 oldie" lang="en-US">
<![endif]-->
<!--[if IE 8]>
<html class="no-js ie8 oldie" lang="en-US">
<![endif]-->
@brunocroh
brunocroh / exemplo.cpp
Created November 19, 2017 00:04
Exemplo em c++
#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <string.h>
int main(void)
{
int cadastrando = 1;
int qtdCadastros = 0;
std::string nomes[20];
$.ajax({
url: "https://viacep.com.br/ws/79805030/json",
type: "GET",
crossDomain: true,
success: function (resp) {
console.log(resp);
},
error: function (xhr, status) {
alert("error");
}
import BaseComponent from '../Base/base.component';
import style from './card.component.css';
export default class CardComponent extends BaseComponent{
constructor(element, data){
super(element);
this.render(data);
this._alturaDeCelulaResponsiva();
}
<?xml version="1.0" encoding="UTF-8"?>
<persistence:persistence xmlns:persistence="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
version="2.0"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd " >
<persistence:persistence-unit name="onzeVencedorPu"/>
</persistence:persistence>