Skip to content

Instantly share code, notes, and snippets.

View viniciusCamargo's full-sized avatar
🧙‍♂️

Vinicius de Sousa Camargo viniciusCamargo

🧙‍♂️
View GitHub Profile
@viniciusCamargo
viniciusCamargo / redact.py
Last active August 5, 2023 23:26
pdf redact
import tkinter as tk
from tkinter import filedialog
from tkinter import messagebox
import os
import shutil
import fitz
rect_coordinates = (230, 827, 370, 840)
def redact_pdf_area(input_pdf, output_pdf):

Direct copy of pre-encoded file:

$ ffmpeg -i filename.mp4 -codec: copy -start_number 0 -hls_time 10 -hls_list_size 0 -f hls filename.m3u8

@viniciusCamargo
viniciusCamargo / app.js
Last active February 24, 2021 15:59
tic tac toe
import React from "react";
import ReactDOM from "react-dom";
const initialBoard = {
a: {
a1: { value: "" },
a2: { value: "" },
a3: { value: "" },
},
b: {
@viniciusCamargo
viniciusCamargo / bg.css
Created February 15, 2021 22:19
heropatterns.com - tailwindcss
{
background-color: #ff4e0e;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260' viewBox='0 0 260 260'%3E%3Cg fill-rule='evenodd'%3E%3Cg fill='%23f6f900' fill-opacity='1'%3E%3Cpath d='M24.37 16c.2.65.39 1.32.54 2H21.17l1.17 2.34.45.9-.24.11V28a5 5 0 0 1-2.23 8.94l-.02.06a8 8 0 0 1-7.75 6h-20a8 8 0 0 1-7.74-6l-.02-.06A5 5 0 0 1-17.45 28v-6.76l-.79-1.58-.44-.9.9-.44.63-.32H-20a23.01 23.01 0 0 1 44.37-2zm-36.82 2a1 1 0 0 0-.44.1l-3.1 1.56.89 1.79 1.31-.66a3 3 0 0 1 2.69 0l2.2 1.1a1 1 0 0 0 .9 0l2.21-1.1a3 3 0 0 1 2.69 0l2.2 1.1a1 1 0 0 0 .9 0l2.21-1.1a3 3 0 0 1 2.69 0l2.2 1.1a1 1 0 0 0 .86.02l2.88-1.27a3 3 0 0 1 2.43 0l2.88 1.27a1 1 0 0 0 .85-.02l3.1-1.55-.89-1.79-1.42.71a3 3 0 0 1-2.56.06l-2.77-1.23a1 1 0 0 0-.4-.09h-.01a1 1 0 0 0-.4.09l-2.78 1.23a3 3 0 0 1-2.56-.06l-2.3-1.15a1 1 0 0 0-.45-.11h-.01a1 1 0 0 0-.44.1L.9 19.22a3 3 0 0 1-2.69 0l-2.2-1.1a1 1 0 0 0-.45-.11h-.01a1 1 0 0 0-.44.1l-2.21 1.11a3 3 0 0 1-2.69 0l-2.2-1.1a1 1 0 0 0-.45-.11h-.01zm0-2h
@viniciusCamargo
viniciusCamargo / framework-sizes.md
Created February 15, 2021 13:35 — forked from Restuta/framework-sizes.md
Sizes of JS frameworks, just minified + minified and gzipped, (React, Angular 2, Vue, Ember)

Below is the list of modern JS frameworks and almost frameworks – React, Vue, Angular, Ember and others.

All files were downloaded from https://cdnjs.com and named accordingly. Output from ls command is stripped out (irrelevant stuff)

As-is (minified)

$ ls -lhS
566K Jan 4 22:03 angular2.min.js
const express = require('express');
const htm = require('htm');
const vhtml = require('vhtml');
// create an html`` tag function for vhtml:
const html = htm.bind(vhtml);
const App = (props) => html`
<div class="app">
<h1>This is an app</h1>
const express = require('express');
const { html, Component } = require('htm/preact');
const renderToString = require('preact-render-to-string');
class App extends Component {
render(props) {
return html`
<div class="app">
<h1>This is an app</h1>
<p>Current server time: ${new Date + ''}</p>
@viniciusCamargo
viniciusCamargo / .prettierrc
Last active April 24, 2023 22:37
.prettierrc
{
"bracketSameLine": true,
"quoteProps": "consistent",
"singleQuote": true,
"jsxSingleQuote": true,
"semi": false,
"trailingComma": "none"
}
@viniciusCamargo
viniciusCamargo / token-generator.js
Created February 4, 2021 23:53 — forked from ziluvatar/token-generator.js
Example of refreshing tokens with jwt
/**
* Example to refresh tokens using https://github.com/auth0/node-jsonwebtoken
* It was requested to be introduced at as part of the jsonwebtoken library,
* since we feel it does not add too much value but it will add code to mantain
* we won't include it.
*
* I create this gist just to help those who want to auto-refresh JWTs.
*/
const jwt = require('jsonwebtoken');
@viniciusCamargo
viniciusCamargo / multiple_ssh_setting.md
Last active August 3, 2023 00:01 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different Github accounts

github multiple keys

$ eval "$(ssh-agent -s)"
$ ssh-add ~/.ssh/{private_key}
$ git clone git@{alias}:{github_user}/{repo}.git

~/.ssh/config