Skip to content

Instantly share code, notes, and snippets.

View abhibalani's full-sized avatar
🙂

Abhishek Balani abhibalani

🙂
View GitHub Profile
@ajoyoommen
ajoyoommen / graph_chess_com.py
Last active May 28, 2018 07:43
Plots the games won, lost and drawn by a player in different game formats. Save PGN files from chess.com into a folder `pgn/`. Requires `matplotlib`.
from datetime import datetime
import os
import re
import sys
import matplotlib.pyplot as plt
USER = "ajoy"
DIRNAME = 'pgn/'
@tomysmile
tomysmile / mac-setup-redis.md
Last active July 16, 2024 04:45
Brew install Redis on Mac

type below:

brew update
brew install redis

To have launchd start redis now and restart at login:

brew services start redis
@k3karthic
k3karthic / truncate_dynamodb.sh
Last active July 12, 2022 18:56
Truncate all keys in a dynamodb table
#!/bin/bash
TABLE_NAME=$1
# Get id list
aws dynamodb scan --table-name $TABLE_NAME | grep ID | awk '{ print $2 }' > /tmp/truncate.list
# Delete from id list
cat /tmp/truncate.list | xargs -IID aws dynamodb delete-item --table-name $TABLE_NAME --key '{ "id": { "S": "ID" }}'