Skip to content

Instantly share code, notes, and snippets.

View vpctorr's full-sized avatar
💭
I may be slow to respond.

Victor vpctorr

💭
I may be slow to respond.
View GitHub Profile
@rphlmr
rphlmr / clear-db.ts
Last active July 15, 2024 04:39
Drizzle snippets
// Credits to Louistiti from Drizzle Discord: https://discord.com/channels/1043890932593987624/1130802621750448160/1143083373535973406
import { sql } from "drizzle-orm";
const clearDb = async (): Promise<void> => {
const query = sql<string>`SELECT table_name
FROM information_schema.tables
WHERE table_schema = 'public'
AND table_type = 'BASE TABLE';
`;
@Gnzlt
Gnzlt / gourcevideo.sh
Created March 6, 2019 13:25
Gource video export command
#!/bin/bash
gource \
-s .03 \
-1280x720 \
--auto-skip-seconds .1 \
--multi-sampling \
--stop-at-end \
--key \
--highlight-users \
@elacheche
elacheche / HUAWEI_E3531.sh
Last active July 5, 2021 14:07
Little script to enable HUAWEI E3531 on Ubuntu
sudo apt-get update && sudo apt-get install usb-modeswitch && v=$(lsusb | grep "Huawei" | awk '{ print $6 }' | awk -F: '{ print $1 }'); p=$(lsusb | grep "Huawei" | awk '{ print $6 }' | awk -F: '{ print $2 }'); sudo usb_modeswitch -v $v -p $p -M '55534243123456780000000000000011062000000100000000000000000000'
@mobilemind
mobilemind / git-tag-delete-local-and-remote.sh
Last active July 2, 2024 00:02
how to delete a git tag locally and remote
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@coolaj86
coolaj86 / how-to-publish-to-npm.md
Last active June 9, 2024 23:19
How to publish packages to NPM

Getting Started with NPM (as a developer)

As easy as 1, 2, 3!

Updated:

  • Aug, 08, 2022 update config docs for npm 8+
  • Jul 27, 2021 add private scopes
  • Jul 22, 2021 add dist tags
  • Jun 20, 2021 update for --access=public
  • Sep 07, 2020 update docs for npm version