Skip to content

Instantly share code, notes, and snippets.

View sbansal's full-sized avatar

Shubham Bansal sbansal

View GitHub Profile
@sbansal
sbansal / nginx.conf
Last active August 29, 2015 14:12
Nginx SSL configuration
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
#!/bin/sh
# Copyright 2011 Dvir Volk <dvirsk at gmail dot com>. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
#
@sbansal
sbansal / pg_gem_installation
Last active August 29, 2015 14:02
pg gem installation
If you are having issues installing the "pg" gem on your machines, try this command.
```
env ARCHFLAGS="-arch x86_64" gem install pg -- --with-pg-config=/Applications/Postgres.app/Contents/Versions/9.3/bin/pg_config
```
@sbansal
sbansal / Elasticsearch installation on Ubuntu
Created January 22, 2014 12:44
Ubuntu VPS elastic search installation
# update the available packages
$ apt-get update
$ apt-get -y install curl git-core python-software-properties
# Java installation as suggested by elasticsearch folks
$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt-get update
$ sudo apt-get install oracle-java7-installer
$ java -version
@sbansal
sbansal / redis_homebrew_installaion
Last active January 2, 2016 08:19
Installing redis using homebrew on Mac
$ brew install redis
To have launchd start redis at login:
$ ln -sfv /usr/local/opt/redis/*.plist ~/Library/LaunchAgents
Then to load redis now:
$ launchctl load ~/Library/LaunchAgents/homebrew.mxcl.redis.plist
Or, if you don't want/need launchctl, you can just run:
$ redis-server /usr/local/etc/redis.conf