Skip to content

Instantly share code, notes, and snippets.

View skamithi's full-sized avatar

Stanley Karunditu skamithi

  • Raleigh, North Carolina
View GitHub Profile
@skamithi
skamithi / Vagrantfile
Last active August 29, 2015 14:27
vagrantfile_for_simple_libvirt_vagrant_setup
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
# https://docs.vagrantup.com.
config.vm.box = "trusty64"
# vagrant issues #1673..fixes hang with configure_networks
config.ssh.shell = "bash -c 'BASH_ENV=/etc/profile exec bash'"
@skamithi
skamithi / VagrantFile
Created August 12, 2015 03:07
vagrantfile_for_simple_libvirt_vagrant_setup
Vagrant.configure(2) do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
# https://docs.vagrantup.com.
# Every Vagrant development environment requires a box. You can search for
# boxes at https://atlas.hashicorp.com/search.
config.vm.box = "trusty64_2"
# vagrant issues #1673..fixes hang with configure_networks
config.ssh.shell = "bash -c 'BASH_ENV=/etc/profile exec bash'"
@skamithi
skamithi / setup.py
Last active August 29, 2015 14:19
setup.py that builds data files in correct location using stdeb , if installed in venv it puts it in sys.prefix + <path>
# pylint: disable=c0111
from netshowlib import get_version
import os
import sys
try:
from setuptools import setup, find_packages
except ImportError:
import ez_setup
ez_setup.use_setuptools()
from setuptools import setup, find_packages
@skamithi
skamithi / testing_ansible.py
Last active August 29, 2015 14:18
host key checking before running ansible playbook
# ansible constants are set when module is imported
# set host key checking before ansible imports
import os
os.environ['ANSIBLE_HOST_KEY_CHECKING'] = 'false'
from ansible import utils
from ansible import callbacks
from ansible import inventory
import ansible.runner
import ansible.playbook
from ansible.callbacks import display
@skamithi
skamithi / in_javascript.coffee
Last active August 29, 2015 14:16
comparing arrays
# requires underscore.js
_und = require 'underscore'
a = [1,2,3,4]
b = [4,3,2,1]
_und.difference(a,b) == []
@skamithi
skamithi / gist:73bb37d70a1e86872f97
Last active August 29, 2015 14:16
running dpkg-buildpackage
$ dpkg-buildpackage -us -uc -b
dpkg-buildpackage: source package sflowtool
dpkg-buildpackage: source version 3.34
dpkg-buildpackage: source distribution unstable
dpkg-buildpackage: source changed by Stanley Kamithi <[email protected]>
dpkg-buildpackage: host architecture amd64
dpkg-source --before-build sflowtool-3.34
fakeroot debian/rules clean
dh clean --with autotools-dev
dh_testdir
@skamithi
skamithi / debian_docs
Created February 24, 2015 05:05
debian/docs file - sflowtool
NEWS
README.md
@skamithi
skamithi / debian_changelog
Last active August 29, 2015 14:16
debian changelog file - sflowtool
sflowtool (3.34) unstable; urgency=low
* Initial Source package build
-- Stanley Kamithi <[email protected]> Thu, 19 Feb 2015 22:10:18 -0500
@skamithi
skamithi / debian_control
Last active August 29, 2015 14:16
debian control file - sflowtool
Source: sflowtool
Section: admin
Priority: optional
Maintainer: The Sflow community
Build-Depends: debhelper (>= 8.0.0), autotools-dev
Standards-Version: 3.9.4
Homepage: http://inmon.com
Package: sflowtool
Architecture: any
@skamithi
skamithi / learning_cross_compiling.md
Created February 22, 2015 04:16
learning how to perform cross compiling