Skip to content

Instantly share code, notes, and snippets.

View goodwillhacking's full-sized avatar
🔨
Building

Goodwill Hacking goodwillhacking

🔨
Building
View GitHub Profile
@bnagy
bnagy / gpgmutt.md
Last active July 21, 2025 11:06
Mutt, Gmail and GPG

GPG / Mutt / Gmail

About

This is a collection of snippets, not a comprehensive guide. I suggest you start with Operational PGP.

Here is an incomplete list of things that are different from other approaches:

  • I don't use keyservers. Ever.
  • Yes, I use Gmail instead of some bespoke hipster freedom service
@QinMing
QinMing / .zshrc
Last active June 21, 2024 02:06
.zshrc (lazy loading shell functions)
# Copyright (c) 2016-2018 Ming Qin (覃明) <https://github.com/QinMing>
# Open source under MIT LICENSE.
lazy_load() {
# Act as a stub to another shell function/command. When first run, it will load the actual function/command then execute it.
# E.g. This made my zsh load 0.8 seconds faster by loading `nvm` when "nvm", "npm" or "node" is used for the first time
# $1: space separated list of alias to release after the first load
# $2: file to source
# $3: name of the command to run after it's loaded
# $4+: argv to be passed to $3
@gusaiani
gusaiani / .vimrc
Last active October 2, 2025 21:29
My .vimrc
call plug#begin('~/.vim/plugged')
Plug 'SirVer/ultisnips'
Plug 'honza/vim-snippets'
Plug 'rdnetto/YCM-Generator', { 'branch': 'stable' }
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
@diegopacheco
diegopacheco / zsh-export-functions-linux.md
Created July 10, 2017 18:54
How to export function in ZSH?
touch ~/.zsh_functions
vim ~/.zsh_functions
function jcurl() {
  curl -s "$@" | json | pygmentize -l json
}

function tojson(){
@tehmachine
tehmachine / vim_lua.md
Last active March 31, 2025 14:25
Compile Vim with Lua

Original issue: Shougo/neocomplete.vim#31

@JohanTan From my experience, this is how it will work (only tested on Ubuntu):

sudo apt-get install liblua5.1-dev
sudo cp -r /usr/include/lua5.1/* /usr/include/lua5.1/include/
sudo ln -s /usr/lib/x86_64-linux-gnu/liblua5.1.so /usr/local/lib/liblua.so
@dkorn
dkorn / compile_nginx_from_sources.yml
Created October 11, 2017 08:57
Ansible Playbook compiling NGINX from sources, to include particular modules
---
- name: Compile NGINX from sources
hosts: webserver
vars:
nginx_version: nginx-1.13.4
nginx_tarball_url: "http://nginx.org/download/{{ nginx_version }}.tar.gz"
nginx_install_dir: "/tmp/{{ nginx_version }}"
nginx_sbin_path: "/usr/sbin/nginx"
nginx_conf_path: "/etc/nginx/nginx.conf"
@zhiyzuo
zhiyzuo / get_coef_table.py
Created May 20, 2018 21:54
Obtain regression model coefficients from statsmodels
import pandas as pd
def get_coef_table(lin_reg):
''' lin_reg is a fitted statsmodels regression model
Return a dataframe containing coefficients, pvalues, and the confidence intervals
'''
err_series = lin_reg.params - lin_reg.conf_int()[0]
coef_df = pd.DataFrame({'coef': lin_reg.params.values[1:],
'ci_err': err_series.values[1:],
'pvalue': lin_reg.pvalues.round(4).values[1:],
@mikepruett3
mikepruett3 / shell-setup.ps1
Last active October 7, 2025 10:21
Packages to install via scoop, winget, choco, and other tools...
<#
.SYNOPSIS
Script to Initialize my custom powershell setup.
.DESCRIPTION
Script uses scoop
.NOTES
**NOTE** Will configure the Execution Policy for the "CurrentUser" to Unrestricted.
Author: Mike Pruett
Date: October 18th, 2018
@jonashackt
jonashackt / molecule.yml
Created November 30, 2018 13:50
Molecule: define host_vars or group_vars in provisioner/inventory that are really used by Molecule´s platform
# Roles which require host/groups to have certain variables set
# see (scroll down!) https://molecule.readthedocs.io/en/latest/configuration.html#provisioner & https://github.com/ansible/molecule/issues/1037
# like:
provisioner:
name: ansible
...
inventory:
host_vars:
docker-debian-stretch:
gitlab_domain: "localhost"
@nerobianchi
nerobianchi / Vagranfile
Last active February 15, 2020 05:41
redis-ha
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
MASTER_NODE_COUNT=1
SLAVE_NODE_COUNT=2
MASTER_NODE_IP_START="10.0.0."
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.provider "virtualbox" do |vb|
vb.memory = 2048
vb.cpus = 1