Skip to content

Instantly share code, notes, and snippets.

@Tomboyo
Tomboyo / vscode_elixir_debugger_instructions.md
Last active May 16, 2025 09:12
Interactive Elixir Debugging with VSCode and ElixirLS

In this Gist we will configure VSCode for Elixir debugging. Once done, we will be able to debug any function with any arguments by opening the VSCode Run (a.k.a Debug) view, selecting the "mix run" debug configuration, and entering any invocation such as Example.run(:my_args) into a command palette prompt. This will let us step through the code as it executes and use breakpoints like normal.

This Gist expects you have the ElixirLS: Elixir Support and Debugger extension installed. This Gist is based on version 0.6.2.

1. Create a launch configuration

Create a .vscode/launch.json file at the root of your project if one does not exist already. Modify the file to contain inputs and configurations like the following:

{
@hmRemi
hmRemi / README.md
Last active May 16, 2025 09:09
Make Discord Server With Tags

Discord Guild ID Hash Targeter Script

Discord no longer provides the tags feature to new servers. This could change, so I'm keeping this active and seeking other ways to get a tag server. I still recommend trying create guilds within the specified hash ranges. Please support by starring this gist and joining our Discord (link below).

Also, selling a script for a fully customizable rotating clan tag. (colors and badge icon - join discord to buy)

Version: 1.2.5 (as per CONFIG.SCRIPT_VERSION in the script)
Discord: https://discord.gg/wSWYhQMdbA | @ziue
Telegram: https://t.me/reveredev/

@nakamuraos
nakamuraos / reset-trial-navicat.sh
Last active May 16, 2025 09:07
Reset trial Navicat 15, Navicat 16, Navicat 17 on Linux
#!/bin/bash
# Author: NakamuraOS <https://github.com/nakamuraos>
# Latest update: 03/19/2025
# Tested on Navicat 15.x, 16.x, 17.x on Debian, Ubuntu.
BGRED="\e[1;97;41m"
ENDCOLOR="\e[0m"
echo -e "${BGRED} ${ENDCOLOR}"
@adtac
adtac / Dockerfile
Last active May 16, 2025 08:58
#!/usr/bin/env docker run
#!/usr/bin/env -S bash -c "docker run -p 8080:8080 -it --rm \$(docker build --progress plain -f \$0 . 2>&1 | tee /dev/stderr | grep -oP 'sha256:[0-9a-f]*')"
# syntax = docker/dockerfile:1.4.0
FROM node:20
WORKDIR /root
RUN npm install sqlite3
@vijay-prema
vijay-prema / ubuntu-on-asus-g14.md
Last active May 16, 2025 08:55
Ubuntu on Asus ROG Zephyrus G14 2021

Ubuntu on Asus ROG Zephyrus G14 2021 (Setup guide)

Here is a way to do a robust install of Ubuntu (+ optional Windows 11 dual boot and LUKS encryption) on an Asus laptop, with minimal usable hardware support, without a significant amount of tinkering that may break in future or require frequent technical attention.

In summary, the key thing is to have an up to date kernel, which usually means disabling secure-boot and installing the latest stable (6.0+) using mainline or xanmod, and as well as making sure the latest nvidia driver and dkms is installed.

Specs:

  • Model Asus G14 2021 (GA401QC)
  • AMD R7 5800 8 core 16 thread (onboard Radeon graphics)
  • NVIDIA RTX 3050 4GB (60W +15W boost)
#! /usr/bin/env python
# -*- coding: utf-8 -*-
""" install pdftoppm first (use your package manager) """
import os
def main(start="."):
for dirpath, dirnames, filenames in os.walk(start):
for filename in filenames:
if filename.endswith('pdf') and not filename.startswith('.') and f'{filename}.jpg' not in filenames:
os.system(f'pdftoppm -jpeg -f 1 -l 1 "{dirpath}/{filename}" > "{dirpath}/{filename}.jpg"')
@maxried
maxried / $README.md
Last active May 16, 2025 08:49
Automatically Sign Kernels After Installation

This script goes into /etc/kernel/postinst.d. You have to make it executable by root, e.g. chown root:root /etc/kernel/postinst.d/00-signing ; chmod u+rx /etc/kernel/postinst.d/00-signing. It assists you with automatically signing freshly installed kernel images using the machine owner key in a way similar to what dkms does. This is mainly useful if you want to use mainline kernels on Ubuntu on Secure Boot enabled systems. This needs shim-signed to be set up. If you have questions this one might help you: While I made this for Ubuntu 20.04, it should work on current Debian based distributions. YMMV.