Skip to content

Instantly share code, notes, and snippets.

View twopoint71's full-sized avatar

Bob Smith twopoint71

View GitHub Profile
@twopoint71
twopoint71 / tag-manager.py
Created December 5, 2023 02:18
Manage EC2 tags from the CLI using a python script
import subprocess
import json
# Global variable to store the selected instance ID
selected_instance_id = None
def load_instance_tags():
global selected_instance_id
selected_instance_id = input("Enter Instance Name or Instance ID: ")
command = f"aws ec2 describe-tags --filters \"Name=resource-id,Values={selected_instance_id}\""
@twopoint71
twopoint71 / init.lua
Last active December 3, 2023 18:58
init.lua for neovim
--[[
=====================================================================
==================== READ THIS BEFORE CONTINUING ====================
=====================================================================
Kickstart.nvim is *not* a distribution.
Kickstart.nvim is a template for your own configuration.
The goal is that you can read every line of code, top-to-bottom, understand
@twopoint71
twopoint71 / init.vim
Last active December 21, 2022 21:07
neovim config
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.config/nvim/bundle/Vundle.vim
call vundle#begin()
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
Plugin 'nathanaelkane/vim-indent-guides'
@twopoint71
twopoint71 / break.py
Created December 20, 2019 01:55 — forked from obfusk/break.py
python equivalent of ruby's binding.pry
import code; code.interact(local=dict(globals(), **locals()))
@twopoint71
twopoint71 / .tmux.conf
Last active December 21, 2022 21:11
tmux config
# rebind the bind key to CTRL-a because I'm a crusty old screen user
set -g prefix C-a
bind-key C-a send-prefix
# unbind the default bind key
unbind C-b
# disable automatically set window title
set -g automatic-rename off
set -g allow-rename off
@twopoint71
twopoint71 / .vimrc
Last active April 17, 2024 13:18
vim config
" general options
set backspace=indent,eol,start " backspace like WYSIWYG in insert mode
set history=100 " command history
set laststatus=2 " status bar always on
set showcmd " show visual mode command info in status line
set showmatch " show matching brackets when possible
set number " line numbers on
" search
set ignorecase
@twopoint71
twopoint71 / gist:451d346901424ef0c926657022ac747d
Created January 17, 2019 20:27
Ruby magical Hash.new({})
irb(main):001:0> require 'pry'
=> true
irb(main):002:0> pry
[1] pry(main)> magic = Hash.new({})
=> {}
[2] pry(main)> magic['bird'] = 'in the hat'
=> "in the hat"
[3] pry(main)> magic.keys
=> ["bird"]
[4] pry(main)> magic['watch']['closely'] = 'this is the trick'
@twopoint71
twopoint71 / ls_ext.js
Created May 7, 2016 00:26
learnyounode lesson
var fs = require("fs"), path = require("path")
var dir = process.argv[2], ext = process.argv[3];
fs.readdir(dir, function (err, data, ext) {
console.log(arguments);
});

Keybase proof

I hereby claim:

  • I am twopoint71 on github.
  • I am twopoint71 (https://keybase.io/twopoint71) on keybase.
  • I have a public key ASAe41C1ZPbkUB2_qgh-hYa34f_oi-bFloewuGzF-jfNhwo

To claim this, I am signing this object: