Skip to content

Instantly share code, notes, and snippets.

View kitallis's full-sized avatar
🍣

Akshay Gupta kitallis

🍣
View GitHub Profile
@kitallis
kitallis / setup-rpi.md
Last active November 26, 2020 11:34
Setup rpi without display (headless)

Pre-req

  • 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)

Download

@kitallis
kitallis / pg_repack.md
Last active September 5, 2017 10:36
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
kitallis / about-batti.md
Last active April 4, 2017 08:29
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.

@kitallis
kitallis / prometheus-osx.sh
Created October 19, 2015 05:50
quickly setup prometheus monitoring on os x
brew install go
export GOPATH=$HOME/golang
export GOROOT=/usr/local/opt/go/libexec
export PATH=$PATH:$GOPATH/bin
export PATH=$PATH:$GOROOT/bin
GO15VENDOREXPERIMENT=1 go get github.com/prometheus/prometheus/cmd/...
prometheus -config.file=prometheus.yml
on run {input, parameters}
set inputVolume to input volume of (get volume settings)
set curVolume to (get volume settings)
if (inputVolume = 0 and (output muted of curVolume is false)) then
set inputVolume to 100
set volume with output muted
set displayNotification to "Microphone on, speakers off"
else if (inputVolume > 0 and (output muted of curVolume is true)) then
@kitallis
kitallis / derange.rb
Last active August 29, 2015 14:24
populates a list of domains and their statuses by joining dictionary words and tlds
#!/usr/bin/env ruby
require 'securerandom'
require 'fileutils'
require 'open-uri'
require 'whois'
def domain_status(domain)
sleep(1.5) # to prevent throttling, if any
@kitallis
kitallis / gist:583543c5d2c0b60e9920
Last active September 11, 2015 14:46
Modeling a game with melody recognition and machine training using ClojureScript and real instruments
@kitallis
kitallis / error
Last active August 29, 2015 14:18
Macro evaluation on Heroku breaks when using (comp)
-----> Clojure (Leiningen 2) app detected
-----> Installing OpenJDK 1.6...done
-----> Using cached Leiningen 2.5.1
Writing: lein script
-----> Building with Leiningen
Running: lein with-profile production compile :all
.
.
.
# core
gulp = require 'gulp'
gutil = require 'gulp-util'
# stream utilities
gif = require 'gulp-if'
path = require 'path'
# plugins
htmlmin = require 'gulp-minify-html'