Skip to content

Instantly share code, notes, and snippets.

View RishikeshDarandale's full-sized avatar
🗨️
learning > implementing

Rishikesh Darandale RishikeshDarandale

🗨️
learning > implementing
View GitHub Profile
@RishikeshDarandale
RishikeshDarandale / 00. tutorial.md
Created December 22, 2015 14:28 — forked from maxivak/00. tutorial.md
Importing/Indexing database (MySQL or SQL Server) in Solr using Data Import Handler
@RishikeshDarandale
RishikeshDarandale / docker.txt
Last active November 28, 2015 11:30
How can I use docker without sudo?
Giving non-root access
The docker daemon always runs as the root user, and since Docker version 0.5.2, the docker daemon binds to a Unix socket instead of a TCP port. By default that Unix socket is owned by the user root, and so, by default, you can access it with sudo.
Starting in version 0.5.3, if you (or your Docker installer) create a Unix group called docker and add users to it, then the docker daemon will make the ownership of the Unix socket read/writable by the docker group when the daemon starts. The docker daemon must always run as the root user, but if you run the docker client as a user in the docker group then you don't need to add sudo to all the client commands. As of 0.9.0, you can specify that a group other than docker should own the Unix socket with the -G option.
Warning: The docker group (or the group specified with -G) is root-equivalent; see Docker Daemon Attack Surface details.
Example:
@RishikeshDarandale
RishikeshDarandale / Oracle_java_install
Last active April 23, 2016 12:33
Installation steps for oracle java on uBuntu
# Remove any installation of openjdk
$ sudo apt-get purge openjdl-\*
# Create a 'java' directory under /usr/local
$ sudo mkdir /usr/local/java
$ cd /usr/local/java
# Copy the installable to /usr/local/java
$ sudo cp ~/Downloads/jdk-8u65-linux-x64.tar.gz .
@RishikeshDarandale
RishikeshDarandale / DropwizardTestSupport.java
Created November 19, 2015 11:46 — forked from csabapalfi/DropwizardTestSupport.java
Dropwizard acceptance testing with Cucumber
package com.csabapalfi.dropwizard;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.common.collect.ImmutableMap;
import com.yammer.dropwizard.Service;
import com.yammer.dropwizard.cli.ServerCommand;
import com.yammer.dropwizard.config.Bootstrap;
import com.yammer.dropwizard.config.Configuration;
import com.yammer.dropwizard.config.Environment;
Pragma: akamai-x-cache-on, akamai-x-cache-remote-on, akamai-x-check-cacheable, akamai-x-get-cache-key, akamai-x-get-extracted-values, akamai-x-get-nonces, akamai-x-get-ssl-client-session-id, akamai-x-get-true-cache-key, akamai-x-serial-no
@RishikeshDarandale
RishikeshDarandale / .gitconfig
Last active September 10, 2015 05:33
Git configuration
[alias]
st=status
ci=commit
br=branch
co=checkout
df=diff
lg=log -p
ds=diff --staged
lol=log --graph --decorate --pretty=oneline --abbrev-commit
lola=log --graph --decorate --pretty=oneline --abbrev-commit --all