Skip to content

Instantly share code, notes, and snippets.

@valyakuttan
valyakuttan / markdown_cheatsheet.md
Created July 26, 2023 17:24
Markdown Cheatsheet

1. Code and Preformatted Text

  • 1.1 Indent four spaces to create an escaped <pre> <code> block:

    printf("%d\n", 42);  /* what was the
     question again? */
    
  • 1.2 Markdown and HTML are ignored within a code block
    You would hate this if it weren't

@valyakuttan
valyakuttan / goldbach47.c
Created July 25, 2023 12:15 — forked from jms137/goldbach47.c
Goldbach Turing machine with 47 states
/*
Goldbach's conjecture tested by a 47-state Turing machine
Author: Jared Showalter
If "a" and "i" were unbounded, this program would halt iff Goldbach's
conjecture is false. Furthermore, the program structurally
corresponds to a Turing machine with two symbols, one tape, and a
small number of states. The array "a" corresponds to the tape (each

Useful jgg and pdf Tricks Using Linux CLI Tools

  1. How to Reduce File Size of Images by Reducing Quality

         $ convert <INPUT_FILE> -quality 10% <OUTPUT_FILE>
  2. How to Reduce File Size of Images in Linux by Reducing Resolution

$ convert -resize 200x200

@valyakuttan
valyakuttan / dnscrypt-proxy-as-podman-container.md
Last active August 24, 2025 06:46
Configue dnscrypt-proxy as a podman container in Fedora Silverblue
@valyakuttan
valyakuttan / tor-proxy-as-podman-containder.md
Last active October 23, 2023 01:20
Configue tor as a podman container in Fedora Silverblue

Configue tor as a podman container in Fedora Silverblue

Installation

  1. Pull image from dockerhub

         $ podman pull docker.io/osminogin/tor-simple

Run a local HTTP server with Docker 🐳

Serve your static website from localhost using Docker and Nginx.

By @arrested-developer

Why Docker?

Do you know the famous phrase "it works on my machine"?

@valyakuttan
valyakuttan / git-commit-title-first-word.md
Created May 8, 2023 12:02 — forked from scmx/git-commit-title-first-word.md
Example list of verbs / first word to use in git commit title #git #commit #title

Example list of first words to use in a git commit title

I like writing well-formed git commits that explain the intention behind why a code change was made.

Check out Chris Beams excellent How to Write a Git Commit Message if you haven't read it.

Anyway, for a project I've been working on I've gathered up 900+ commits that hold up a pretty high quality (except for one 😁). Let's look at some trends about these commits!

Most common first words in commit titles of a project

@valyakuttan
valyakuttan / Fedora_38.md
Last active March 1, 2023 12:45
[Setting up dnscrypt-proxy on Fedora 38]

Setting up dnscrypt-proxy on Fedora 38

Installation

  1. Install dnscrypt-proxy

         $ sudo dnf install dnscrypt-proxy
@valyakuttan
valyakuttan / remove_grub_from_windows11.md
Last active August 28, 2025 01:29
How to remove GRUB from Windows 11

1. How do I use gdb?

When you compile your program, you must tell the compiler to produce a program that is compatible with the debugger. The debugger needs special information to run properly. To do this, you must compile your program with the debugger flag, -g. This step is critical. Without it, the debugger won't have the program symbol information. That means it won't know what your functions and variables are called, and it won't understand when you ask it about them.

How do I...?