Skip to content

Instantly share code, notes, and snippets.

@creaktive
creaktive / TerminusBold.dfont
Last active January 6, 2019 13:09
Terminus Powerline for Mac OS X
#!/bin/bash
# Script for installing tmux on systems where you don't have root access.
# tmux will be installed in $HOME/local/bin.
# It's assumed that wget and a C/C++ compiler are installed.
# exit on error
set -e
TMUX_VERSION=1.8
@favadi
favadi / build-emacs.sh
Last active September 16, 2025 22:30
Compile latest emacs version (24.5) in Ubuntu 14.04
#!/bin/bash
# Build latest version of Emacs, version management with stow
# OS: Ubuntu 14.04 LTS
# version: 24.5
# Toolkit: lucid
# Warning, use updated version of this script in: https://github.com/favadi/build-emacs
set -e
@MattDMo
MattDMo / ipy_repl.py
Last active April 3, 2022 23:16
SublimeREPL ipy_repl.py for running IPython/Jupyter in Sublime Text
# from https://gist.github.com/MattDMo/6cb1dfbe8a124e1ca5af
import os
import json
import socket
import threading
activate_this = os.environ.get("SUBLIMEREPL_ACTIVATE_THIS", None)
# turn off pager
@deehzee
deehzee / psycopg2_sshtunnel.py
Last active January 16, 2025 15:22
How to Connect To PostgreSQL Using SSHTunnelForwarder and Psycopg2
import psycopg2
from sshtunnel import SSHTunnelForwarder
# For interactive work (on ipython) it's easier to work with explicit objects
# instead of contexts.
# Create an SSH tunnel
tunnel = SSHTunnelForwarder(
('128.199.169.188', 22),
ssh_username='<username>',
@rajkrrsingh
rajkrrsingh / Kafka-MirrorMaker-Set-Up.md
Created September 5, 2017 09:14
Kafka Mirror Maker - from source non-kerberized cluster to kerberized cluster

Kafka Mirror Maker - from source non-kerberized cluster to target (kerberized) cluster

Env:

source cluster:
HDP242
un-secure
hostname: rksnode1

destination cluster:
@norbornen
norbornen / nodejs-postgresql-ssh-tunnel-proxy.js
Created October 14, 2020 12:31
Node.js postgresql connecting with ssh-tunnel proxy
const fs = require('fs');
const os = require('os');
const tunnelSsh = require('tunnel-ssh');
const { Pool } = require('pg');
(async () => {
/** @type {import('net').Server} */
let tunnel;
try {
@pirafrank
pirafrank / vim_install.sh
Last active December 1, 2025 14:42
Install vim from source (+python3 +ruby and more) on Ubuntu 20.04 Focal Fossa (GUI options enabled)
#!/bin/bash
# Remove old vim installs
sudo apt-get remove vim vim-runtime gvim vim-tiny \
vim-common vim-gui-common vim-nox gvim
# install vim-gtk deps
sudo apt-get build-dep vim-gtk
# install some more deps