Skip to content

Instantly share code, notes, and snippets.

View goodwillhacking's full-sized avatar
🔨
Building

Goodwill Hacking goodwillhacking

🔨
Building
View GitHub Profile
@karpathy
karpathy / add_to_zshrc.sh
Created August 25, 2024 20:43
Git Commit Message AI
# -----------------------------------------------------------------------------
# AI-powered Git Commit Function
# Copy paste this gist into your ~/.bashrc or ~/.zshrc to gain the `gcm` command. It:
# 1) gets the current staged changed diff
# 2) sends them to an LLM to write the git commit message
# 3) allows you to easily accept, edit, regenerate, cancel
# But - just read and edit the code however you like
# the `llm` CLI util is awesome, can get it here: https://llm.datasette.io/en/stable/
gcm() {
@tamphh
tamphh / rust-command-line-utilities.markdown
Created November 8, 2022 14:36 — forked from sts10/rust-command-line-utilities.markdown
A curated list of command-line utilities written in Rust

A curated list of command-line utilities written in Rust

Note that I have not tried all of these personally, and cannot and do not vouch for all of the tools listed here. In most cases, the descriptions here are copied directly from their code repos. Some may have been abandoned. Investigate before installing/using.

The ones I use regularly include: bat, dust, exa, fd, hyperfine, miniserve, ripgrep, just, zoxide and cargo-wipe.

  • atuin: "Magical shell history"
  • bandwhich: Terminal bandwidth utilization tool
  • bat: A replacement for cat that provides syntax highlighting and other features.
  • bottom: Yet another cross-platform graphical process/system monitor.
#region Local Configuration Manager
[DSCLocalConfigurationManager()]
configuration LCMConfig
{
Node localhost
{
Settings
{
ConfigurationMode = 'ApplyAndAutoCorrect'
# Check for updates once a day
@tamphh
tamphh / git_fzf.sh
Last active March 30, 2024 20:32 — forked from junegunn/gist:f4fca918e937e6bf5bad
Browsing git commit history with fzf
# git log show with fzf
#
# https://gist.github.com/tamphh/3c9a4aa07ef21232624bacb4b3f3c580/edit
# https://asciinema.org/a/257939
#
# git log show with fzf
gli() {
# param validation
@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
@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"
@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
@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:],
@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"
@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