Skip to content

Instantly share code, notes, and snippets.


Akshay Gupta kitallis

View GitHub Profile
kitallis /
Created Oct 19, 2015
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
prometheus -config.file=prometheus.yml
View speak-or-listen.applescript
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 / derange.rb
Last active Aug 29, 2015
populates a list of domains and their statuses by joining dictionary words and tlds
View derange.rb
#!/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 / gist:583543c5d2c0b60e9920
Last active Sep 11, 2015
Modeling a game with melody recognition and machine training using ClojureScript and real instruments
View gist:583543c5d2c0b60e9920
kitallis / error
Last active Aug 29, 2015
Macro evaluation on Heroku breaks when using (comp)
View error
-----> 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'
kitallis / gist:0c9cde99b423f041d1b6
Last active Aug 29, 2015
using cool climate to make a pledge
View gist:0c9cde99b423f041d1b6
kitallis / 4clj.clj
Last active Aug 29, 2015
4clojure solutions
View 4clj.clj
(fn [x] (first (reverse x)))
(fn [x] (second (reverse x)))
(fn [x] (first (rest (reverse x))))
kitallis / egon-download.rb
Last active Jan 1, 2016
download all the egon schiele paintings from
View egon-download.rb
require 'nokogiri'
require 'open-uri'
html_doc = Nokogiri::HTML(open(BASE_PATH) { |url| })
html_doc.xpath('//td//a', 'align' => 'center').each do |image_element|
image_name = image_element.values.first
next if File.file?(image_name)
download_path = File.join(BASE_PATH, image_name)