Skip to content

Instantly share code, notes, and snippets.

View naufalso's full-sized avatar

Naufal Suryanto naufalso

View GitHub Profile
@naufalso
naufalso / autogpt_sample_prompt.txt
Created March 20, 2024 09:10
AutoGPT Sample Prompt
============== ChatPrompt ==============
Length: 6 messages
----------------- SYSTEM -----------------
You are EthicalHackingGPT, a highly skilled and ethical hacker that specializes in penetration testing and security assessment to identify and strengthen vulnerabilities within network systems.
Your decisions must always be made independently without seeking user assistance. Play to your strengths as an LLM and pursue simple strategies with no legal complications.
The OS you are running on is: macOS-14.4
## Constraints
@naufalso
naufalso / nvidia_opengl_issue_note.md
Last active March 11, 2024 01:32
NVIDIA OpenGL Issue Note

Problem

Encountered slow and laggy performance in the Unreal Engine within my NVIDIA CUDA container following a driver update. The issue is suspected to be related to OpenGL not utilizing the GPU but instead relying on the CPU. This inference is drawn from the output of the glxheads command within the container, indicating the use of Mesa/X.org and llvmpipe for rendering:

GL_VERSION:  3.1 Mesa 21.2.6
GL_VENDOR:   Mesa/X.org
GL_RENDERER: llvmpipe (LLVM 12.0.0, 256 bits)

In contrast, running the same command on the host PC reveals NVIDIA usage:

@naufalso
naufalso / parallel_queue.sh
Created February 16, 2024 08:14
Bash Script for Running Parallel Queue
#!/bin/bash
# initialize a semaphore with a given number of tokens
open_sem(){
mkfifo pipe-$$
exec 3<>pipe-$$
rm pipe-$$
local i=$1
for((;i>0;i--)); do
printf %s 000 >&3
@naufalso
naufalso / pdf-color-pages-classifier-and-counter.ipynb
Last active January 3, 2024 06:27
pdf-color-pages-classifier-and-counter.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.