Skip to content

Instantly share code, notes, and snippets.

@jramnani
jramnani / keybase.md
Created November 4, 2017 16:59
Keybase proof

Keybase proof

I hereby claim:

  • I am jramnani on github.
  • I am jramnani (https://keybase.io/jramnani) on keybase.
  • I have a public key ASDNaTq4L2xCNSPRwTVRCYnlAcTglGmNv2yg0FopWdkBfwo

To claim this, I am signing this object:

@jramnani
jramnani / ansible-dynamic-inventory-config.txt
Created September 19, 2016 20:44
Trying to point to a dynamic inventory script from within a project-local config file.
$ ansible --version
ansible 2.1.1.0
config file = /Users/jramnani/path/to/ansible-playbooks/ansible.cfg
configured module search path = Default w/o overrides
$ cat ansible.cfg
[default]
inventory=./inventory/ec2.py
# The code:
class MyView(APIView):
authentication_classes = (TokenAuthentication,)
permission_classes = (IsAuthenticated,)
@csrf.csrf_exempt
def get(self, request):
return Response({}, status=200)
(defn create-board
"Create a new board. Initializes all cells to be dead."
[num-columns num-rows]
(let [row (vec (repeat num-columns false))
board (vec (repeat num-rows row))]
board))
(defn generate-random-row
[num-columns]
@jramnani
jramnani / nix-libsodium-error.txt
Created February 11, 2015 21:47
Nix build error for libsodium on OS X 10.10
$ nix-env -i libsodium
installing ‘libsodium-1.0.2’
these derivations will be built:
/nix/store/pa9m21c85f9ml6fqiax4wr98w5gg7wlv-libsodium-1.0.2.drv
building path(s) ‘/nix/store/np5xi3mfq0kq7ljvba87wkx2dy52732d-libsodium-1.0.2’
unpacking sources
unpacking source archive /nix/store/amvg9xj89mamj49rjgbyf2x94yvww5jc-libsodium-1.0.2.tar.gz
source root is libsodium-1.0.2
patching sources
configuring
@jramnani
jramnani / debug.log
Created October 17, 2014 17:45
Vagrant issue #4658
INFO global: Vagrant version: 1.6.5
INFO global: Ruby version: 2.0.0
INFO global: RubyGems version: 2.0.14
INFO global: VAGRANT_EXECUTABLE="/Applications/Vagrant/bin/../embedded/gems/gems/vagrant-1.6.5/bin/vagrant"
INFO global: VAGRANT_LOG="debug"
INFO global: VAGRANT_INSTALLER_EMBEDDED_DIR="/Applications/Vagrant/bin/../embedded"
INFO global: VAGRANT_INSTALLER_VERSION="2"
INFO global: VAGRANT_DETECTED_OS="Darwin"
INFO global: VAGRANT_INSTALLER_ENV="1"
INFO global: VAGRANT_INTERNAL_BUNDLERIZED="1"
@jramnani
jramnani / saltstack.rb
Last active December 14, 2015 03:59
Install SaltStack (http://saltstack.org/) on OS X using Homebrew. Salt has native dependencies that are already in Homebrew, and I wanted to make it easier to install. I doubt this will make it into the official Homebrew formulas.
require 'formula'
class Saltstack < Formula
homepage 'http://saltstack.org'
url 'https://github.com/saltstack/salt/archive/v0.13.1.zip'
sha1 '56ee585b42c9f45330fb76f5a3c4bd2259a116a0'
depends_on 'libyaml'
depends_on 'msgpack'
depends_on 'swig' => :build
@jramnani
jramnani / plan9port.rb
Created February 24, 2013 18:27
Homebrew formula for plan9port
require 'formula'
class Plan9port < Formula
homepage 'http://swtch.com/plan9port/'
url 'https://bitbucket.org/rsc/plan9port', :using => :hg, :tag => '697c23cebcec'
version '20120603'
md5 '18993b6993950864f7fb95f73ac47168'
head 'https://bitbucket.org/rsc/plan9port', :using => :hg
keg_only "plan9port includes system programs like 'cat' and 'awk', and you may not want to override their OS X equivalents."