Skip to content

Instantly share code, notes, and snippets.

View rahulvramesh's full-sized avatar
💻
#bud

Rahul V Ramesh rahulvramesh

💻
#bud
View GitHub Profile
@rahulvramesh
rahulvramesh / iterm2-solarized.md
Created October 6, 2016 17:29 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Meslo powerline font (OS X / macOS)

Solarized

@rahulvramesh
rahulvramesh / howto_pow_ubuntu.txt
Created October 27, 2016 06:53 — forked from benolee/howto_pow_ubuntu.txt
HowTo Ubuntu pow-like setup
$ sudo aptitude install apache2 dnsmasq
$ sudo vim /etc/dnsmasq.conf
# ...
address=/dev/127.0.0.1
listen-address=127.0.0.1
$ sudo vim /etc/dhcp3/dhclient.conf
# uncomment line 20:
@rahulvramesh
rahulvramesh / description
Created October 27, 2016 17:05 — forked from tobob/description
My unicorn and nginx configuration
My unicorn and nginx configuration
use ln -s and place new_app in 'sites-enabled' folder
usefull commands:
lsof -wni tcp:8080 - get PID of all unicorn processes
kill -9 PID - kill process
nginx -s reload - reload nginx
unicorn_rails -c /home/workspace/new_app/config/unicorn.rb -D - starts unicorn server
@rahulvramesh
rahulvramesh / deploy.rb
Created October 27, 2016 18:30 — forked from jbonney/deploy.rb
Mina deployment file to setup new host for Rails applications. Creates the folder structure, fill up the database.yml file, create the associated DB and user and set up new Apache virtual host file.
require 'mina/bundler'
require 'mina/rails'
require 'mina/git'
require 'mina/rvm'
# Usually mina focuses on deploying to one host and the deploy options are therefore simple.
# In our case, there is a number of possible servers to deploy to, it is therefore necessary to
# specify the host that we are targeting.
server = ENV['server']
# Since the same host can have multiple applications running in parallel, it is necessary to
@rahulvramesh
rahulvramesh / Java.md
Created January 16, 2017 03:46 — forked from JeOam/Java.md
Install Java 8 on OS X

on El Capitan, after installing the brew...

$ brew update
$ brew tap caskroom/cask
$ brew install Caskroom/cask/java

And Java 8 will be installed at /Library/Java/JavaVirtualMachines/jdk1.8.xxx.jdk/

Check version:

@rahulvramesh
rahulvramesh / bash_function
Created February 3, 2017 06:06 — forked from asimpson/bash_function
This little script sets up a custom domain in MAMP and your hosts file.
function vhost {
sudo ~/.dotfiles/osx/mamp_vh.sh $1
}
@rahulvramesh
rahulvramesh / PhonecallReceiver.java
Created April 9, 2017 08:18 — forked from ftvs/PhonecallReceiver.java
Detecting an incoming call coming to an Android device. Remember to set the appropriate permissions in AndroidManifest.xml as suggested in the Stackoverflow link. Usage example in comments. Source: http://stackoverflow.com/a/15564021/264619 Explanation: http://gabesechansoftware.com/is-the-phone-ringing/#more-8
package com.gabesechan.android.reusable.receivers;
import java.util.Date;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.telephony.TelephonyManager;
public abstract class PhonecallReceiver extends BroadcastReceiver {
@rahulvramesh
rahulvramesh / README.md
Created October 11, 2017 02:51
Install PHP7 on OS X El Capitan

Install PHP7 on OS X El Capitan

add the taps, unlink the old PHP if required and add php7

brew tap homebrew/dupes
brew tap homebrew/versions
brew tap homebrew/homebrew-php
brew unlink php56
brew install php70
@rahulvramesh
rahulvramesh / Dockerfile
Last active January 26, 2020 17:39
Lumen + PHP 7.0 + Apache + Docker
FROM php:7.0-apache
RUN apt-get update && apt-get install -y software-properties-common python-software-properties git
RUN apt-get update && apt-get -y upgrade && DEBIAN_FRONTEND=noninteractive && apt-get install -y libpq-dev zip unzip \
&& docker-php-ext-configure pgsql -with-pgsql=/usr/local/pgsql \
&& docker-php-ext-install pdo pdo_pgsql pgsql bcmath
RUN a2enmod rewrite