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
@Nebuchadrezzar
Nebuchadrezzar / update_zprezto
Created August 5, 2017 17:52
update fork of .zpresto
# upstream is the source repro, origin is a forked copy.
git fetch upstream
git checkout master
git merge upstream/master
git submodule update --init --recursive
git commit -m "updates from upstream"
git push origin
### Keybase proof
I hereby claim:
* I am nebuchadrezzar on github.
* I am raven_over_snow (https://keybase.io/raven_over_snow) on keybase.
* I have a public key ASB3C29QjurhhzPqnfITf1thGwf4-dQSLZ0eDA5PaFE9oAo
To claim this, I am signing this object:
@Nebuchadrezzar
Nebuchadrezzar / netrw.txt
Created June 19, 2021 15:28 — forked from danidiaz/netrw.txt
Vim's netrw commands.
--- ----------------- ----
Map Quick Explanation Link
--- ----------------- ----
< <F1> Causes Netrw to issue help
<cr> Netrw will enter the directory or read the file |netrw-cr|
<del> Netrw will attempt to remove the file/directory |netrw-del|
<c-h> Edit file hiding list |netrw-ctrl-h|
<c-l> Causes Netrw to refresh the directory listing |netrw-ctrl-l|
<c-r> Browse using a gvim server |netrw-ctrl-r|
<c-tab> Shrink/expand a netrw/explore window |netrw-c-tab|
@Nebuchadrezzar
Nebuchadrezzar / terminfo_export.sh
Last active October 27, 2022 03:30
export and import terminfo
# Export
infocmp -x tmux-256color >! tmux256
nfocmp -x xterm-kitty >! xterm-kitty
# Import
tic -x tmux256
tic -x xterm-kitty
@Nebuchadrezzar
Nebuchadrezzar / build_tmux.sh
Created April 26, 2023 15:31
Build Tmux 3.3a on Amazon linux 2
# Install tmux 3.3a on Amazon Linux 2
# Install dependencies
sudo yum install -y gcc kernel-devel make ncurses-devel
# Download src dependencies for tmux and compile:
curl -LOk https://github.com/libevent/libevent/releases/download/release-2.1.11-stable/libevent-2.1.11-stable.tar.gz
tar -xf libevent-2.1.11-stable.tar.gz
@Nebuchadrezzar
Nebuchadrezzar / build_sqlite3.sh
Created April 26, 2023 16:08
Build sqlite on Amazon Linux 2
# Install dependencies
sudo yum install gcc
# Download sqlite3:
curl -LOk https://www.sqlite.org/2022/sqlite-autoconf-3380500.tar.gz
tar xzf sqlite-autoconf-3380500.tar.gz
# Configure and compile:
@Nebuchadrezzar
Nebuchadrezzar / gist:d87e13f4a7023c0340bd2a2b0c2a552b
Created May 3, 2023 14:24
Build Python 3.10 on Amazon Linux 2
Download the sources (sqlite 3230100 was broken, 3220000 was used instead):
$ wget https://www.openssl.org/source/openssl-1.1.0h.tar.gz
$ wget https://sqlite.org/2018/sqlite-src-3220000.zip
$ wget https://www.python.org/ftp/python/3.10.4/Python-3.10.4.tar.xz
Move src to /usr/local/src.
$ mv openssl-1.1.0h.tar.gz /usr/local/src/
$ mv sqlite-src-3220000.zip /usr/local/src/
@Nebuchadrezzar
Nebuchadrezzar / yourapp
Last active November 10, 2023 02:25 — forked from leplatrem/yourapp
gunicorn virtualenv init.d script (could be simpler with upstart)
#! /bin/bash
### BEGIN INIT INFO
# Provides: yourapp
# Required-Start: nginx
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: The main django process
# Description: The gunicorn process that receives HTTP requests
# from nginx
@Nebuchadrezzar
Nebuchadrezzar / poetry-convert.py
Created November 15, 2023 20:53 — forked from tigerhawkvok/poetry-convert.py
Convert a requirements.txt file to a Poetry project
#!python3
"""
Convert a requirements.txt file to a Poetry project.
Just place in the root of your working directory and run!
"""
sourceFile = "./requirements.txt"
import re
import os