Skip to content

Instantly share code, notes, and snippets.

View shrikanthkr's full-sized avatar
🏠
Working from home

Shrikanth shrikanthkr

🏠
Working from home
View GitHub Profile
@shrikanthkr
shrikanthkr / git_commands_starter
Last active May 6, 2018 19:48
simple git commands
<h2>ReadMe<h2>
<h4>General Git Commands</h4>
https://www.git-tower.com/blog/git-cheat-sheet/
> git clone `<project-url>`
>
> git checkout `<branch-name>` -- to checkout a branch
>
@shrikanthkr
shrikanthkr / AnnotationProcessing.md
Last active September 2, 2017 05:54
Steps For adding annotation processor in android
  • Add two modules one for api and other for processor(Ensure its a java library) - There are conflicts in javax pacakges between android jar and jdk javax packages.
  • include apt plugin
apply plugin: 'com.neenbedankt.android-apt'

buildscript {
  repositories{
    mavenCentral()
   }

 dependencies{

@shrikanthkr
shrikanthkr / install-oh-my-zsh-on-ubuntu
Created January 31, 2016 14:03 — forked from richardtape/install-oh-my-zsh-on-ubuntu
Install Oh My ZSH on Ubuntu 14.04
# Where is the location of your current shall. Useful if we need to revert
echo $0
# Install ZSH
sudo apt-get install zsh
# Instal GIT
sudo apt-get install git-core
# Install OhMyZSH
@shrikanthkr
shrikanthkr / solarize-terminator.sh
Last active September 7, 2015 10:25 — forked from kynan/solarize-terminator.sh
shell script for setting terminator color palette to use Solarized theme
#!/bin/bash
#
# Shell script that configures terminator to use solarized theme
# colors. Assumes a single terminator profile. Tested on Ubuntu 11.10.
#
# Solarized theme: http://ethanschoonover.com/solarized
#
# Original from 79CetiB:
# http://www.reddit.com/r/emacs/comments/npfmv/i_need_some_help_with_the_solarized_theme_in_a/c3b4mds
#
# Probably excessive, but it makes these instructions simpler
sudo -i
# Add postgresql repo and update apt listing
echo "deb http://apt.postgresql.org/pub/repos/apt/ squeeze-pgdg main" > /etc/apt/sources.list.d/pgdg.
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
apt-get update
# For some reason this is necessary with PostgreSQL on Ubuntu 12.04
update-alternatives --remove postmaster.1.gz /usr/share/postgresql/9.1/man/man1/postmaster.1.gz
# Nginx+Unicorn best-practices congifuration guide. Heartbleed fixed.
# We use latest stable nginx with fresh **openssl**, **zlib** and **pcre** dependencies.
# Some extra handy modules to use: --with-http_stub_status_module --with-http_gzip_static_module
#
# Deployment structure
#
# SERVER:
# /etc/init.d/nginx (1. nginx)
# /home/app/public_html/app_production/current (Capistrano directory)
#
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-git2.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
<style id="jsbin-css">
#parent{
width:40px;

Basic Packages

sudo apt-get update
sudo apt-get install git-core python-software-properties software-properties-common

Install nginx

sudo add-apt-repository ppa:nginx/stable
sudo apt-get update

Business Models

Advertising

Models Examples
Display ads Yahoo!
Search ads Google
@shrikanthkr
shrikanthkr / UsingPromises
Last active August 29, 2015 14:04
Sample for using promises
function promise(arg){
return new Promise(function(resolve,reject){
if(arg)
resolve(arg);
else
reject('Error');
});
}