Skip to content

Instantly share code, notes, and snippets.


Akshay Gupta kitallis

View GitHub Profile
kitallis /
Last active Mar 12, 2021
clj on windows

Setting up clojure on windows for beginners.

I tried 3 ways:

  • Install a windows linux sub-system - this was too hard to setup
  • Setting all deps from ground-up (git, java, curl etc.) - this was too hard to setup
  • Using scoop - this is the simplest way, described below

Note: this has only been tested on Windows 10

kitallis /
Last active Nov 26, 2020
backup pictures over rsync
# this syncs safely, doesn't trash things on the server if you deleted locally, only accretes, only includes pictures
# for the rest of my mac I just rely on Time Machine backups
# includes a per-file progress bar (from rsync) and an overall progress bar using the pv utility
rsync -Phca --ignore-existing --bwlimit=1000 --stats --include="*" --include="Pictures/Photos Library.photoslibrary/" --include="Pictures/Photos Library.photoslibrary/***" -e "ssh" "$source" "$destination" | pv -lep -s $(rsync -av --dry-run "$source" "$destination" | awk 'NF' | wc -l)
# in bash_profile or equivalent,
alias backup='$HOME/bin/backup'
kitallis /
Last active Nov 9, 2020
generic package mgmt commands
if [ -z "$1" ]
echo "Usage: pakg <i(nstall)|r(emove)|s(earch)|u(pdate)|l(ist)>"
os=$([[ -f /etc/os-release ]] && grep ^ID= /etc/os-release | cut -d = -f 2 || uname)
echo --------------------- "$os" --------------------
case $os in

Keybase proof

I hereby claim:

  • I am kitallis on github.
  • I am kitallis ( on keybase.
  • I have a public key ASCNbGUxnsIJxJ7vDZyJL98BtU-_g9CBeVrKIKHMSFCd6wo

To claim this, I am signing this object:

kitallis / capacity-reserve.clj
Created Nov 21, 2018
Figure out capacity reserve for any app ever
View capacity-reserve.clj
(defn degraded-boxes [degradation-time chef-time sleep-time concurrency]
(* concurrency (Math/ceil
(/ degradation-time
(+ chef-time sleep-time)))))
(defn number-of-boxes [chef-time
kitallis / static-file-server.go
Last active Jan 13, 2021
serve static files / directory with http basic auth in Go
View static-file-server.go
Simple static file server with http basic auth in go
-p="8100": port to serve on
-d=".": the directory of static files to host
Navigating to http://localhost:8100 will display the index.html or directory
listing file.
kitallis / setup-do.bash
Last active Sep 29, 2018
quickly setup a Digital Ocean debian 9 box
View setup-do.bash
adduser kitallis
usermod -aG sudo kitallis
apt update
apt upgrade
apt install ufw
ufw app list
ufw allow OpenSSH
ufw enable
ufw status
cp -r ~/.ssh /home/kitallis
kitallis /
Last active Nov 26, 2020
Setup rpi without display (headless)


  • Raspberry Pi 3
  • LAN Cable (tested on CAT6 cable)
  • USB Cable (2.x)
  • SD Card (class 10, >8gb)
  • Mac OS X (tested on Sierra and above)


kitallis /
Last active Sep 5, 2017
some notes on using pg_repack

so if table is 350g, free space should be = 700

given you current DB = 900gb, and your disk = 1.3gb, you should bump it up to at least 1.6tb

that will ensure 20% free space and space for an additional table

things to keep in mind before using repack:

1. response time during repack *will* increase – make sure you do it at night
kitallis /
Last active Apr 4, 2017
About Batti and E-waste

The following are the messages we send out usually to create awareness and and also asking ppl to donate e-waste. You can probably circulate them amongst your group, to attain clarity about what we do.

About Batti

Greetings from everyone at Batti! North East India—beautiful and serene, but many homes are yet to get electrical lighting.

Batti is a an initiative of Further & Beyond Foundation. Batti strives to provide basic lighting for North East India’s most remote inhabitants. We have been installing a solar powered systems that give access to artificial light in tribal homes. So far, Batti has reached more than 1000 people in 282 homes. ​ A part of our funds are generated by upcycling and recycling e-waste.