Skip to content

Instantly share code, notes, and snippets.

View bhalothia's full-sized avatar
🛠️
Building something cool. ;)

Virendra Singh Bhalothia bhalothia

🛠️
Building something cool. ;)
View GitHub Profile
@bhalothia
bhalothia / Clearcache.sh
Created April 30, 2014 19:47
Clearing cache on a linux machine
#!/bin/sh
sync; echo 3 > /proc/sys/vm/drop_caches
swapoff -a && swapon -a
@bhalothia
bhalothia / EC2 - Elastic cloud computing
Last active August 29, 2015 14:00
AWS SysOps Preparation:This gist would cover my preparation for AWS SysOps from scratch.
1) EC2
Reference Link: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/concepts.html
EC2 provides a lot of features using these resources:
BASICS:
-> Instances
-> AMIs
@bhalothia
bhalothia / Disk Usage Check
Created May 6, 2014 11:43
Simple disk space usage commands.
$ cd /
$ du -sh *
4.0K jboss.sh
0 list.txt
4.0K log_rotation.sh
1.5G nohup.out
4.0K script.sh
4.0K stop_backup.sh
41M testdeploy
@bhalothia
bhalothia / Pushing data to S3 buckets
Created May 6, 2014 13:39
This is for pushing data to S3 buckets
Pre requisites - s3cmd installation and configuration (http://s3tools.org/s3cmd)
$ s3cmd put <folder_needs_to_be_pushed> s3://<bucket_name> --recursive
@bhalothia
bhalothia / Dash-boarding Cloud Metrics
Last active August 29, 2015 14:01 — forked from textarcana/README.md
Monitoring dashboards on cloud
This gist contains everything you need to install StatsD and Graphite on CentOS 6.3. Unless I forgot something. If I did, shoot a reminder email to noah at one more bug dot com. **tl;dr: womm, ymmv, yolo.**
I (mostly) followed the steps shown in the [EZUnix wiki](http://www.ezunix.org/index.php?title=Install_statsd_and_graphite_on_CentOS_or_RHEL)
And I also referred back to [this gist by Michael Grace](http://geek.michaelgrace.org/2011/09/how-to-install-graphite-on-ubuntu/)
@bhalothia
bhalothia / Find a file on Linux
Last active August 29, 2015 14:01
Find a file on Linux command line
Let's say, you want to search 'file.txt' Go the directory where you want to search.
$ cd 'dir_path'
$ find . -name 'file.txt'
For detailed tutorial: http://content.hccfl.edu/pollock/unix/findcmd.htm
I would like to list out some of the points that differentiates GIT from SVN as a Version Control tool.
1. Basic difference between the above mentioned tools are that SVN is a Centralized and GIT is a Distributed version control tool.
2. Commit happens atomic in nature for SVN where as for GIT it's more like file versioning happens with every commit.
3. GIT versions by storing the contents of the files for tracking history where as in SVN the basic data storage is done by creating a differences between the individual files for each change.
4. GIT stores every changes in any of its sub-directories of its project structure within the .git folder that gets created only on the parent folder of the project structure where the git initialized a new git repository where as in SVN the .svn will be created in every sub-directories within the project structure to store the metadatas of each and every file and folder.
@bhalothia
bhalothia / S3CMD
Created May 10, 2014 14:05
Command line tool for managing Amazon S3 and CloudFront services
S3cmd tool for Amazon Simple Storage Service (S3)
=================================================
S3cmd is a free command line tool and client for uploading,
retrieving and managing data in Amazon S3 and other cloud
storage service providers that use the S3 protocol, such as
Google Cloud Storage or DreamHost DreamObjects. It is best
suited for power users who are familiar with command line
programs. It is also ideal for batch scripts and automated
backup to S3, triggered from cron, etc.
@bhalothia
bhalothia / RootConf2014 Bangalore
Created May 12, 2014 19:54
Topics covered in workshop and my take on em
Workshop:
-> Introduction to Go Continuous Delivery Software -- ThoughtWorks pitching in it's paid tool.
-> Linux containers (LXC) and future of software delivery -- Getting a lot of attention, perhaps due to Docker
-> SELinux for the Uninitiated -- Interesting...why would I choose to enable SELinux? Personally I end up disabling it each time. :)
-> Continuous deployment with Fabric -- Couldn't figure out what was the ISP..Chef offers it already and a lot more. [http://www.slideshare.net/tanihito/automated-deployment-with-fabric]
-> Continuous Delivery using Jenkins - Jenkins is an aswesome tool..create as a CI tool but easily extendible to CD as well.. my own presentation from few months back [http://www.slideshare.net/bhalothia/jenkins-a-complete-solution]
@bhalothia
bhalothia / Setting up Nagios on Centos
Created May 18, 2014 23:43
Monitoring your infra!
A very well explained article on setting up Nagios.
http://www.unixmen.com/install-and-configure-nagios-in-centos-6-4-rhel-6-4/