Skip to content

Instantly share code, notes, and snippets.

# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
sudo kill `lsof -t -i:9000`
@induhub
induhub / clean.sh
Created January 12, 2015 11:39
docker cleanup
docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)
docker rmi -f $(docker images -q)
@induhub
induhub / rabbit.py
Last active August 29, 2015 14:06
rabbitmq
sudo pip install pika==0.9.8
import pika
connection = pika.BlockingConnection()
channel = connection.channel()
@induhub
induhub / java.sh
Created September 20, 2014 12:58
Installing Java version 8 update 20 on Ubuntu 14.04
#! /bin/bash
add-apt-repository ppa:webupd8team/java
apt-get update
apt-get install oracle-java8-installer
apt-get install oracle-java8-set-default
git clone http://github.com/induhub/dricode.git
#######################################################################
# Save this file to your /usr/local/bin (Ubuntu 14.04LTS)
# then do chmod 755 git_clone.sh
# Go to your home directory, add the following line to .bash_aliases file.
# (create it if the file doesn't exist already)
# alias clone='/usr/local/bin/git_clone.sh'
# Now you can use it like
# as@xps:~/works$ clone awsma-server
# as@xps:~/works$
# instead of typing the long version
@induhub
induhub / plotly_stream.py
Created July 16, 2014 15:16
plotly_stream.py
import plotly.plotly as py
from plotly.graph_objs import Figure,Data,Scatter
from random import randint
import time
t=1
my_data = Data([Scatter(x=[],y=[],
stream=dict(token='akxp47t0xu'))])
my_fig = Figure(data=my_data)
py.plot(my_fig)
docker run -d -v ~/indu_wordpress:/var/www/html --link some-mysql:mysql -p 8000:80 wordpress