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 / s3_website.rake
Created September 9, 2016 06:17 — forked from alikhajeh1/s3_website.rake
Rake task to upload static website to AWS S3 using the s3cmd command-line tool
require 'fileutils'
OUT_DIR = 'public'
desc 'Prepare and upload the static site to S3'
task :upload, [:name] do |t, args|
raise Exception.new('You must provide the name of site to upload to, e.g., be rake upload[www]') unless args[:name]
puts "Removing existing output directory"
FileUtils.rm_rf OUT_DIR if File.exists?(OUT_DIR)
@RishikeshDarandale
RishikeshDarandale / _config.yml
Created August 19, 2016 13:31 — forked from alialo/_config.yml
Twitter Bootstrap style pagination in Jekyll
paginate: 10
@RishikeshDarandale
RishikeshDarandale / gulpfile.js
Created July 26, 2016 06:37 — forked from halex2005/gulpfile.js
gulpfile for codeofcliber blog
var gulp = require('gulp');
// build tasks
var childProcess = require('child_process');
gulp.task('jekyll', function(cb) {
var child = childProcess.exec('jekyll build', function(error, stdout, stderr) {
cb(error);
});
});
@RishikeshDarandale
RishikeshDarandale / script.sh
Last active July 4, 2016 04:40
Adding a custom resolution to uBuntu
# create the mode using super user
$ sudo cvt 1366 768 60
[sudo] password for user:
# 1368x768 59.88 Hz (CVT) hsync: 47.79 kHz; pclk: 85.25 MHz
Modeline "1368x768_60.00" 85.25 1368 1440 1576 1784 768 771 781 798 -hsync +vsync
# add the new mode from above commands output
$ sudo xrandr --newmode "1368x768_60.00" 85.25 1368 1440 1576 1784 768 771 781 798 -hsync +vsync
# Verify the monitor name
@RishikeshDarandale
RishikeshDarandale / pr.md
Created April 27, 2016 06:31 — forked from piscisaureus/pr.md
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@RishikeshDarandale
RishikeshDarandale / command.sh
Created April 12, 2016 15:03
Installing the self signed certificate on ubuntu
#apt-get install ca-certificates
#cp cacert.pem /usr/share/ca-certificates
#dpkg-reconfigure ca-certificates
@RishikeshDarandale
RishikeshDarandale / README.md
Created March 11, 2016 04:37 — forked from hofmannsven/README.md
My simply Git Cheatsheet
@RishikeshDarandale
RishikeshDarandale / git.commit.message
Last active April 15, 2016 03:00
Linus Torvalds about the commit message
Also, please write good git commit messages. A good commit message
looks like this:
Header line: explain the commit in one line (use the imperative)
Body of commit message is a few lines of text, explaining things
in more detail, possibly giving some background about the issue
being fixed, etc etc.
The body of the commit message can be several paragraphs, and
@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: