Skip to content

Instantly share code, notes, and snippets.

View mvenkatesh431's full-sized avatar
🎯
Focusing

Venkatesh Macha mvenkatesh431

🎯
Focusing
View GitHub Profile
sudo yum update -y
sudo yum install httpd -y
sudo systemctl enable httpd
sudo systemctl start httpd
TOKEN=`curl -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 21600"`
INSTANCE_IP=$(curl -H "X-aws-ec2-metadata-token: $TOKEN" -s http://169.254.169.254/latest/meta-data/public-ipv4)
echo "Hello from instance with IP: $INSTANCE_IP, Running httpd" | sudo tee /var/www/html/index.html
# Hello from instance with IP: 54.218.123.250, Running httpd
#!/usr/bin/env python
'''Crop an image to just the portions containing text.
Usage:
./crop_morphology.py path/to/image.jpg
This will place the cropped image in path/to/image.crop.png.
For details on the methodology, see
@mvenkatesh431
mvenkatesh431 / maintain-blog-links.php
Created February 27, 2017 12:54
Maintain-blog-links
#!/bin/bash
# GUI-related packages
pkgs="
xserver-xorg-video-fbdev
xserver-xorg xinit
gstreamer1.0-x gstreamer1.0-omx gstreamer1.0-plugins-base
gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-alsa
gstreamer1.0-libav
epiphany-browser
@mvenkatesh431
mvenkatesh431 / setup-janus
Created January 31, 2017 14:36 — forked from jaychsu/setup-janus
Setup [janus-gateway](https://github.com/meetecho/janus-gateway) on ubuntu
#!/bin/bash
# REF: https://github.com/meetecho/janus-gateway/blob/master/README.md
# REF: https://groups.google.com/forum/#!msg/meetecho-janus/RYP4FBaeUi0/bIGSPZlpEQAJ
# Tested enviroment: ubuntu {14.04,16.04} LTS
# Tested Janus version: 0.2.0
# 0. Get infos and params without empty
# ======
set -e
@mvenkatesh431
mvenkatesh431 / install-freeswitch-17.sh
Created November 4, 2016 14:11 — forked from areski/install-freeswitch-17.sh
Install FreeSWITCH 1.7
#!/bin/bash
#
# Arezqui Belaid <[email protected]>
#
FS_CONFIG_PATH=/etc/freeswitch
FS_BASE_PATH=/usr/src
FS_VERSION=v1.7
@mvenkatesh431
mvenkatesh431 / latest-ffmpeg-centos6.sh
Created September 22, 2016 10:15 — forked from mustafaturan/latest-ffmpeg-centos6.sh
Installs latest ffmpeg on Centos 6
# source: https://trac.ffmpeg.org/wiki/CentosCompilationGuide
yum install autoconf automake gcc gcc-c++ git libtool make nasm pkgconfig zlib-devel
mkdir ~/ffmpeg_sources
cd ~/ffmpeg_sources
curl -O http://www.tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gz
tar xzvf yasm-1.2.0.tar.gz
cd yasm-1.2.0
@mvenkatesh431
mvenkatesh431 / freeswitch_ubuntu_14_04.sh
Created August 4, 2016 09:21
freeswitch ubuntu 14.04
#add the repositories
sudo apt-get update && sudo apt-get install -y curl
curl http://files.freeswitch.org/repo/deb/debian/freeswitch_archive_g0.pub | sudo apt-key add -
echo "deb http://files.freeswitch.org/repo/deb/freeswitch-1.6/ jessie main" | sudo tee /etc/apt/sources.list.d/freeswitch.list
sudo apt-get update
# install dependencies
sudo apt-get install -y libyuv-dev libvpx2-dev liblua5.2-dev libvpx2-dev libvpx2 zlib1g-dev libspeex1 libopus-dev libsndfile-dev autoconf automake devscripts gawk g++ git-core 'libjpeg-dev|libjpeg62-turbo-dev' libncurses5-dev 'libtool-bin|libtool' make python-dev gawk pkg-config libtiff5-dev libperl-dev libgdbm-dev libdb-dev gettext libssl-dev libcurl4-openssl-dev libpcre3-dev libspeex-dev libspeexdsp-dev libsqlite3-dev libedit-dev libldns-dev libpq-dev
#!/bin/bash
# description: Tomcat Start Stop Restart
#
processname: tomcat
# chkconfig: 234 20 80
JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.45-28.b13.el6_6.x86_64/jre/
export JAVA_HOME
PATH=$JAVA_HOME/bin:$PATH
export PATH