Skip to content

Instantly share code, notes, and snippets.

View HonbraDev's full-sized avatar

Honbra HonbraDev

View GitHub Profile
@okunishinishi
okunishinishi / Remove all git tags
Created March 8, 2014 03:12
Delete all git remote tags
#Delete local tags.
git tag -l | xargs git tag -d
#Fetch remote tags.
git fetch
#Delete remote tags.
git tag -l | xargs -n 1 git push --delete origin
#Delete local tasg.
git tag -l | xargs git tag -d
@Kartones
Kartones / postgres-cheatsheet.md
Last active July 23, 2024 09:14
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
This work, excluding the Arch Linux logo, is made available under CC0: https://creativecommons.org/publicdomain/zero/1.0/
@prail
prail / polyglot.bat
Created October 23, 2017 17:00
Bash and Batch polyglot. (Really nice for build scripts that need to support multiple platforms.)
echo off
echo ; set +v # > NUL
echo ; function GOTO { true; } # > NUL
GOTO WIN
# bash part, replace it to suit your needs
exit 0
:WIN
REM win part, replace it to suit your needs
@lord-carlos
lord-carlos / ytdl.sh
Last active August 5, 2023 03:19
Uses youtube-dl with 15 threads
#!/bin/bash
#youtube-dl --external-downloader axel --external-downloader-args "-n 15 -a -k" "$@"
youtube-dl --external-downloader aria2c --external-downloader-args "-c -j 5 -x 10 --summary-interval=0" "$@"
According to all known laws of aviation, there is no way a bee should be able to fly.
Its wings are too small to get its fat little body off the ground.
The bee, of course, flies anyway because bees don't care what humans think is impossible.
Yellow, black. Yellow, black. Yellow, black. Yellow, black.
Ooh, black and yellow!
Let's shake it up a little.
Barry! Breakfast is ready!
Coming!
Hang on a second.
Hello?
@MidSpike
MidSpike / readme.md
Last active July 19, 2024 20:45
CVE-2022-23812 | RIAEvangelist/node-ipc is malware / protest-ware
@yewtudotbe
yewtudotbe / what-happened-downtime-july2023.md
Last active July 9, 2024 10:18
Why yewtu.be was down? (July 2023)

On the 30th of June, my cloud provider, Oracle Cloud, decided to shutdown all my servers hosted on two Oracle Cloud accounts.
It is known that this provider will randomly ban accounts without any reason.

Why yewtu.be doesn't accept new registrations nor logging into an account?

Unfortunately and this is 100% my fault for forgetting that, I only had data duplication between servers located in the two Oracle Cloud accounts and no backups.
I thought that I wouldn't get all my accounts in trouble at the same time and able to recover the data from one of the two accounts but unfortunately this turned out otherwise.

Implementing some backup was something I had in my notes for a long time but I think I forgot about it, maybe due to the huge amount of work I spend on the open source projects.
I'm deeply sorry if you have lost your subscriptions list or playlists or watch history. I did try to contact Oracle Cloud for recovering the data, I'm waiting for their answer but you should be certain that they

@aamiaa
aamiaa / RevertNewLayout.md
Last active July 7, 2024 14:56
Revert New Discord Layout

The original snippet no longer works!

On 02/09/2024 at around 8pm UTC, Discord flipped an experiment (2023-09_mobile_redesign_override_toggles) which ignores the layout toggle that this script relied on.

If you want to continue using the old layout, you can either use a modded mobile client (such as Vendetta) to disable that experiment, or downgrade to an old version of the app.

Method 1 - Downgrading (Android)

Tip

Use this one if you want a fast, beginner-friendly solution and don't mind using a version from November 2023

  1. Download version 205.15 of Discord mobile app from ApkMirror
// ==UserScript==
// @name Photopea Premium
// @namespace http://tampermonkey.net/
// @version 2024-02-03
// @description Unlock Photopea Premium by patching their JS
// @author mat
// @match https://www.photopea.com/
// @match https://www.photopea.com/?utm_source=homescreen
// @icon https://www.google.com/s2/favicons?sz=64&domain=photopea.com
// @grant GM_webRequest