Skip to content

Instantly share code, notes, and snippets.

/* eslint-disable @typescript-eslint/no-explicit-any */
// eslint-disable-next-line @typescript-eslint/no-unused-vars
import * as joi from 'joi'
type ArrayType<T> = T extends (infer U)[] ? U : never
declare module 'joi' {
interface Root {
extend(...extensions: Array<joi.Extension | joi.ExtensionFactory>): this
@panzelva
panzelva / fbootfix.md
Created September 30, 2020 12:07 — forked from smac89/fbootfix.md
Linux Fix Fastboot "no permissions, verify udev rules"

Determine your device id

  1. Unplug your device from the computer and type lsusb in the terminal. You should get an output similar to this:
Bus 002 Device 002: ID 8087:8000 Intel Corp. 
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:8008 Intel Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 005: ID 0bda:0129 Realtek Semiconductor Corp. RTS5129 Card Reader Controller
@panzelva
panzelva / slack
Created June 1, 2020 07:03
Slack commands
# meeting reminder
/remind @user "Meeting" every weekday at 8:50am
@panzelva
panzelva / k8s_utils.sh
Last active May 27, 2020 10:59
Kubernetes
#!/bin/bash
# create temporary debug pod with network tools (ubuntu based)
kubectl run --rm debug -it --generator=run-pod/v1 --image arunvelsriram/utils bash
# create temporary debug pod with network tools (alpine based)
kubectl run --rm debug -it --generator=run-pod/v1 --image praqma/network-multitool sh
# delete all Errored pods in namespace
# WARNING! destructive
const path = require("path")
module.exports = {
parser: "@typescript-eslint/parser",
plugins: ["@typescript-eslint", "react-hooks"],
extends: [
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended",
"prettier",
"prettier/react",
version: "3.7"
services:
tinyproxy:
image: vimagick/tinyproxy
ports:
- "8888:8888"
restart: always
volumes:
- $PWD/tinyproxy:/etc/tinyproxy
@panzelva
panzelva / count.sh
Last active September 14, 2020 12:56
bash snippets
#!/bin/bash
# Count all files in current folder
ls -1q -U | wc -l
# Example output:
# 262787
@panzelva
panzelva / change_user_password.sql
Last active March 16, 2020 10:00
PostgreSQL snippets
ALTER USER <user_name> WITH PASSWORD '<user_password>';