Skip to content

Instantly share code, notes, and snippets.

View santthosh's full-sized avatar

Santthosh santthosh

  • California
  • 18:23 (UTC -07:00)
View GitHub Profile
@santthosh
santthosh / Dockerfile
Created February 23, 2024 05:11
Running Ruby 2.4.10 in a docker container
FROM ubuntu:latest
# install dependencies
RUN apt-get update
RUN apt-get install -y build-essential
RUN apt-get install -y wget
RUN apt-get install -y rbenv
# install older version of Open SSL
RUN wget https://www.openssl.org/source/openssl-1.1.1g.tar.gz
@santthosh
santthosh / apache rewrite rule
Created November 14, 2014 08:38
Apache config for SPA's
# To be inside the /Directory
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.html [L]
</IfModule>
@santthosh
santthosh / ImageMgick Install
Created October 23, 2014 22:17
Install ImageMagick on Amazon Linux AMI
# Download the source
curl -o ImageMagick.tar.gz http://www.imagemagick.org/download/ImageMagick.tar.gz
# Extract
cd ImageMagick-6.8.9
# Build
./configure
make
@santthosh
santthosh / Python 2.7 Installation
Created October 23, 2014 21:16
Installing Python and latest PIP on Amazon EC2 Linux
# Adopted from http://www.lecloud.net/post/61401763496/install-update-to-python-2-7-and-latest-pip-on-ec2
# install build tools
sudo yum install make automake gcc gcc-c++ kernel-devel git-core -y
# install python 2.7 and change default python symlink
sudo yum install python27-devel -y
sudo rm /usr/bin/python
sudo ln -s /usr/bin/python2.7 /usr/bin/python
@santthosh
santthosh / node.js project dependencies description
Created August 22, 2014 21:30
Get details on nodejs project dependencies from package.json
'use strict';
/*
* Generates a report of npm components the project uses for compliance
* Author: @santthosh
*/
var npm = require('npm');
var viewPackageInfo = function(err, data) {
var myApp = angular.module('behaviorApp',[],null);
myApp.directive("enter",function(){
return function(scope,element){
element.bind("mouseenter",function(){
console.log("I'm inside of the panel!");
})
}
})
#!/bin/bash
# from here: http://www.codingsteps.com/install-redis-2-6-on-amazon-ec2-linux-ami-or-centos/
# and here: https://raw.github.com/gist/257849/9f1e627e0b7dbe68882fa2b7bdb1b2b263522004/redis-server
###############################################
# To use:
# wget https://gist.github.com/santthosh/6094607/raw/2990f6232f4a4eac7904d4deb2344c19455aee1f/install-redis.sh
# chmod 777 install-redis.sh
# ./install-redis.sh
###############################################
echo "*****************************************"