Skip to content

Instantly share code, notes, and snippets.

View elendil7's full-sized avatar
πŸ—
πŸŽ·πŸ“

Aragorn (Vit) elendil7

πŸ—
πŸŽ·πŸ“
View GitHub Profile
@ythecombinator
ythecombinator / change-commit-date.md
Last active March 16, 2022 18:35
Changin' a commit timestamp.

Changing a commit date info

Reason

My country is under a daylight saving time period and not all my commits are made during the morning/afternoon. Because I commited after 11:00 PM - which, given the local DST, was after 00:00 AM - my 100+ days commit streak got broken - which made me very unhappy.

The process

@jagrosh
jagrosh / Github Webhook Tutorial.md
Last active April 27, 2025 05:33
Simple Github -> Discord webhook

Step 1 - Make a Discord Webhook

  1. Find the Discord channel in which you would like to send commits and other updates

  2. In the settings for that channel, find the Webhooks option and create a new webhook. Note: Do NOT give this URL out to the public. Anyone or service can post messages to this channel, without even needing to be in the server. Keep it safe! WebhookDiscord

Step 2 - Set up the webhook on Github

  1. Navigate to your repository on Github, and open the Settings Settings
@mraaroncruz
mraaroncruz / steps.md
Last active April 21, 2025 20:36
Get the Telegram channel ID

To get the channel id

  1. Create your bot with botfather
  2. Make you bot an admin of your channel

Simplest way (via @anhtuank7c)

Go to Telegram web and open a channel, get the ID from -[channel id] from hash in the path

https://web.telegram.org/k/#-9999999999999

@artizirk
artizirk / id_rsa to pem converting.md
Last active January 20, 2024 10:37
Converting openssh private key format to pem

Converting openssh private key format to pem

man page says that you can use -e option to convert private and public keys to other formats, that seems to be wrong. Instead you can use -p option to request changing the password but not actually setting the password.

ssh-keygen -p -f id_rsa -m pem

Converting pem to OpenPGP

Monkeysphere project includes a pem2openpgp command that can be used to import ssh private keys to gnupg keyring.

'use strict';
const puppeteer = require('puppeteer');
(async () => {
/* PRECONDITION:
0. download ublock, I used https://github.com/gorhill/uBlock/releases/download/1.14.19b5/uBlock0.chromium.zip
1. run $PATH_TO_CHROME --user-data-dir=/some/empty/directory --load-extension=/location/of/ublock
2. enable block lists you want to use
*/
@bradtraversy
bradtraversy / mongodb_cheat_sheet.md
Last active April 22, 2025 11:58
MongoDB Cheat Sheet

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database

@optimistic5
optimistic5 / FireflyIII-in-10-min.md
Last active April 21, 2024 19:58
[DEPRECATED] How to setup Firefly III in 10 min with NGINX and auto-renewal SSL

I would like to tell how to setup Firefly III with auto-renewal SSL in docker-compose.

We will use jwilder.

This is NGINX which will be follow all containers and issue Let's encrypt certificates for them.

  1. Prepare server or rent VPS. I use hostens VPS, you can use my referral link, plus google some promotional code and it will be very cheap and good VPS.
@sergiks
sergiks / README.md
Last active November 19, 2024 12:20
Let's Encrypt wildcard certificates in docker

NGINX and Certbot example with CloudFlare API in Docker

Sample config files to demonstrate seup that creates and updates free SSL certificates from Let's Encrypt given that the domains are maintained at CloudFlare service.

How it works

Certbot verifies domains ownership by accessing CloudFlare API that adds temporary TXT DNS records. To enable it You must provide your CloudFlare API token. More details in documentation for dns-cloudflare Certbot plugin.

Certbot saves created certificates in Docker volume certbot_etc. Pay attention to output of the certbot run - it mentions path to the created certificates.

@advaith1
advaith1 / top bots.md
Last active April 20, 2025 21:44
The top Discord bots ranked by server count
Rank Bot Approximate Server Count Library
1 MEE6 21,300,000 Custom Python
2 Rythm πŸͺ¦ 15,200,000 JDA
3 carl-bot πŸ…±οΈ 10,900,000 Pycord
4 Groovy πŸͺ¦ 10,100,000 JDA, Discord4J
5 Dyno
@sekaiwish
sekaiwish / reverse_permissions.py
Last active June 10, 2023 23:15
Discord Permissions Integer Calculator
#!/usr/bin/env python3
names = [
"create instant invite", # 1
"kick members", # 2
"ban members", # 4
"administrator", # 8
"manage channels", # 16
"manage server", # 32
"add reactions", # 64
"view audit log", # 128