Skip to content

Instantly share code, notes, and snippets.

View needcaffeine's full-sized avatar

Vic Vijayakumar needcaffeine

View GitHub Profile
@keelerm84
keelerm84 / vote.zsh
Last active November 6, 2020 14:35
Short function to monitor voting results in battleground states
function vote {
curl --silent https://alex.github.io/nyt-2020-election-scraper/battleground-state-changes.csv | \
awk -v red="$(tput setaf 1)" \
-v blue="$(tput setaf 4)" \
-v reset="$(tput sgr0)" \
-F "," '
NR==1 { next }
matches[$1] == 1 { next }
{
matches[$1]=1
@aurorabbit
aurorabbit / progress.10s.sh
Last active August 5, 2020 00:16
Bitbar timely progress bar
#!/bin/sh
# add this to your bitbar directory
# don't forget to chmod +x
# width and characters for the progress bars
# feel free to configure these
width=30
fill_char="█"
empty_char="▁"
@nirbhabbarat
nirbhabbarat / aws_delete_ami_boto3.py
Created February 9, 2018 06:56
Delete/Deregister 30 days old AMI in AWS using boto3 and python
#!/usr/bin/env python
##### USE ON YOUR OWN RISK - THIS IS GOING TO DEREGISTER AMI OLDER THAN 30 DAYS
import boto3
from dateutil.parser import parse
import datetime
age = 30
aws_profile_name = 'prod'
def days_old(date):
get_date_obj = parse(date)
@needcaffeine
needcaffeine / Python3 Virtualenv Setup.md
Created January 2, 2018 06:41 — forked from pandafulmanda/Python3 Virtualenv Setup.md
Setting up and using Python3 Virtualenv on Mac

Python3 Virtualenv Setup

Requirements
  • Python 3
  • Pip 3
$ brew install python3
@pandafulmanda
pandafulmanda / Python3 Virtualenv Setup.md
Last active October 5, 2024 17:12 — forked from akszydelko/Python3 Virtualenv Setup.md
Setting up and using Python3 Virtualenv on Mac

Python3 Virtualenv Setup

Requirements
  • Python 3
  • Pip 3
$ brew install python3