Skip to content

Instantly share code, notes, and snippets.

View vczb's full-sized avatar
🙃
Code with passion, unleash your creations.

Vinicius Zucatti vczb

🙃
Code with passion, unleash your creations.
View GitHub Profile
@vczb
vczb / tlp.conf
Created November 24, 2023 18:58
/etc/tlp.conf - TLP user configuration
# ------------------------------------------------------------------------------
# /etc/tlp.conf - TLP user configuration
# See full explanation: https://linrunner.de/en/tlp/docs/tlp-configuration.html
#
# New configuration scheme (TLP 1.3). Settings are read in the following order:
# 1. Intrinsic defaults
# 2. /etc/tlp.d/*.conf - Drop-in customization snippets
# 3. /etc/tlp.conf - User configuration (this file)
#
@vczb
vczb / dark-palette.css
Created July 25, 2023 11:56
ahrefs theme
:root {
--white: #fff;
--white90: #ededed;
--white80a: rgba(255, 255, 255, 0.6);
--white70a: rgba(255, 255, 255, 0.5);
--white60: #848586;
--white60a: rgba(255, 255, 255, 0.4);
--white50a: rgba(255, 255, 255, 0.33);
--white40: #676869;
--white40a: rgba(255, 255, 255, 0.26);
@vczb
vczb / apache2.conf
Created July 23, 2023 14:49
/etc/apache2/apache2.conf
# This is the main Apache server configuration file. It contains the
# configuration directives that give the server its instructions.
# See http://httpd.apache.org/docs/2.4/ for detailed information about
# the directives and /usr/share/doc/apache2/README.Debian about Debian specific
# hints.
#
#
# Summary of how the Apache 2 configuration works in Debian:
# The Apache 2 web server configuration in Debian is quite different to
# upstream's suggested way to configure the web server. This is because Debian's
@vczb
vczb / vercel.json
Created November 29, 2022 20:57
redirect from a subdomain to a subpath with vercel
{
"rewrites": [
{
"source": "/mysubpath",
"destination": "https://mydestinationserver.app/"
}
]
}
@vczb
vczb / variables.scss
Created September 3, 2022 22:53
solidus variables
// -------------------------------------------------------------
// Variables used in all other files
//--------------------------------------------------------------
// Fonts
//--------------------------------------------------------------
$font-size-pill: 11px;
$label-font-size: 12px;
// Colors
@vczb
vczb / api.json
Created April 26, 2022 01:48
US zip code
[
{
"min": 35000,
"max": 36999,
"code": "AL",
"name": "Alabama"
},
{
"min": 99500,
"max": 99999,
@vczb
vczb / fruits.json
Created April 13, 2022 20:23
fruits api
{
"id": 1,
"name": "banana",
"image": "https://upload.wikimedia.org/wikipedia/commons/thumb/d/de/Bananavarieties.jpg/220px-Bananavarieties.jpg"
},
{
"id": 2,
"name": "apple",
"image": "https://upload.wikimedia.org/wikipedia/commons/thumb/9/92/95apple.jpeg/220px-95apple.jpeg"
},
@vczb
vczb / docker-compose-downgrade.sh
Created April 12, 2022 10:45
downgrade docker-compose
sudo rm /usr/local/bin/docker-compose
sudo curl -L "https://github.com/docker/compose/releases/download/1.27.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
@vczb
vczb / getBrowserName.js
Created March 25, 2022 17:52
Get browser name
// https://github.dev/facebook/react/tree/main/packages/react-devtools-extensions
const IS_EDGE = navigator.userAgent.indexOf('Edg') >= 0;
const IS_FIREFOX = navigator.userAgent.indexOf('Firefox') >= 0;
const IS_CHROME = IS_EDGE === false && IS_FIREFOX === false;
export type BrowserName = 'Chrome' | 'Firefox' | 'Edge';
export function getBrowserName(): BrowserName {
if (IS_EDGE) {
return 'Edge';
@vczb
vczb / fetcher.js
Created March 18, 2022 23:40
fetcher.ts
type FetchRequest = {
url: string;
method?: "GET" | "POST";
body?: object;
headers?: {
[key: string]: string;
};
};
type Error = {