Skip to content

Instantly share code, notes, and snippets.

View Nebuchadrezzar's full-sized avatar
🏠
Working from home

Nebuchadrezzar Nebuchadrezzar

🏠
Working from home
View GitHub Profile
@beniwohli
beniwohli / greek_alphabet.py
Created January 4, 2011 19:29
A Python dictionary mapping the Unicode codes of the greek alphabet to their names
greek_alphabet = {
u'\u0391': 'Alpha',
u'\u0392': 'Beta',
u'\u0393': 'Gamma',
u'\u0394': 'Delta',
u'\u0395': 'Epsilon',
u'\u0396': 'Zeta',
u'\u0397': 'Eta',
u'\u0398': 'Theta',
u'\u0399': 'Iota',
@plentz
plentz / nginx.conf
Last active November 27, 2025 12:39
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@romainl
romainl / grep.md
Last active December 2, 2025 15:34
Instant grep + quickfix

FOREWORDS

I don't mean the snippet at the bottom of this gist to be a generic plug-n-play solution to your search needs. It is very likely to not work for you or even break things, and it certainly is not as extensively tested and genericised as your regular third-party plugin.

My goal, here and in most of my posts, is to show how Vim's features can be leveraged to build your own high-level, low-maintenance, workflows without systematically jumping on the plugins bandwagon or twisting Vim's arm.


Instant grep + quickfix

import os
import sys
from contextlib import contextmanager
from copy import deepcopy
@contextmanager
def no_output():
original_stdout = sys.stdout
sys.stdout = open(os.devnull, "w")