Skip to content

Instantly share code, notes, and snippets.

@kcpavan
kcpavan / app.DockerFile
Created June 14, 2018 17:39 — forked from satendra02/app.DockerFile
docker+rails+puma+nginx+postgres (Production ready)
FROM ruby:2.3.1
# Install dependencies
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs
# Set an environment variable where the Rails app is installed to inside of Docker image:
ENV RAILS_ROOT /var/www/app_name
RUN mkdir -p $RAILS_ROOT
# Set working directory, where the commands will be ran:
@kcpavan
kcpavan / Dockerfile
Created November 12, 2017 17:07 — forked from RoyalIcing/Dockerfile
Rails 5.1 Dockerfile
FROM ruby:2.4-alpine
ENV PATH /root/.yarn/bin:$PATH
RUN apk update && apk upgrade && \
apk add --no-cache bash git openssh build-base nodejs tzdata
RUN apk update \
&& apk add curl bash binutils tar gnupg \
&& rm -rf /var/cache/apk/* \
@kcpavan
kcpavan / digital_ocean_setup.md
Last active September 21, 2015 06:23 — forked from ChuckJHardy/digital_ocean_setup.md
DigitalOcean Ubuntu 14.04 x64 + Rails 4 + Nginx + Unicorn + PostgreSQL + Capistrano 3 Setup Instructions

DigitalOcean Ubuntu 14.04 x64 + Rails 4 + Nginx + Unicorn + PostgreSQL + Capistrano 3

SSH into Root

$ ssh root@123.123.123.123

Change Root Password

@kcpavan
kcpavan / spread.sass
Last active August 29, 2015 14:16 — forked from averyvery/spread.sass
// strip-units required by spread mixin
// http://stackoverflow.com/questions/12328259/how-do-you-strip-the-unit-from-any-number-in-sass
@function strip-units($number)
@return $number / ($number * 0 + 1)
// pow and sqrt required by ease function
// adapted from https://github.com/at-import/Sassy-math/blob/master/sass/math.scss
@function pow($base, $exponent)
$value: $base

A list of resources that aspiring Rails developers can use to learn Rails and other relevant technologies. This list includes some resources that I see recommended all over the web--not all of which I like--as well as some hidden gems that I've found valuable. This list is intended to supplement my blog post here.

Ruby

  • Codecademy
    • One of the more well-known sites to offer interactive programming tutorials, Codecademy is probably best utilized by those who are pretty new to programming, though the Ruby tutorial is good for teaching Ruby syntax and eventually gets into some less trivial material.
  • Try Ruby
  • Pretty similar to Codecademy. Once again, it's beginner-friendly, though, as someone who knew about object-oriented programming beforehand, I found it somewhat annoying to use, as there's no page with links to the individual exercises (at le

Many of my friends have shared their reading lists of all the books they read in 2014 (thank you!) -- this gave me some excellent ideas of books to read for 2015.

So I have decided to share my reading list as well, and the list of books I plan to read in 2015. If you have any ideas for additional books, I'd love them (especially in the topic areas of business, finance, nonfiction).

Favorite books I read in 2014:

  • The Hard Thing About Hard Things: Building a Business When There Are No Easy Answers by Ben Horowitz
  • The Everything Store: Jeff Bezos and the Age of Amazon by Brad Stone
  • The Effective Executive: The Definitive Guide to Getting the Right Things Done by Peter F Drucker
  • Zero to One: Notes on Startups, or How to Build the Future by Peter Thiel
<div class="container">
<div class="row">
<div class="col-sm-6 col-md-4 col-md-offset-4">
<h1 class="text-center login-title">Sign in to continue to Bootsnipp</h1>
<div class="account-wall">
<img class="profile-img" src="https://lh5.googleusercontent.com/-b0-k99FZlyE/AAAAAAAAAAI/AAAAAAAAAAA/eu7opA4byxI/photo.jpg?sz=120"
alt="">
<form class="form-signin">
<input type="text" class="form-control" placeholder="Email" required autofocus>
<input type="password" class="form-control" placeholder="Password" required>
@kcpavan
kcpavan / sublime_settings
Created March 17, 2014 08:25
My Sublime Settings
{
"caret_extra_bottom": 2,
"caret_extra_top": 2,
"caret_extra_width": 4,
"caret_style": "solid",
"color_scheme": "Packages/Theme - Cobalt2/cobalt2.tmTheme",
"font_size": 13,
"highlight_line": true,
"highlight_modified_tabs": true,
"ignored_packages":
data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script>
@kcpavan
kcpavan / gist:3660717
Created September 6, 2012 22:04
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (PC)

Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.

Editing

Ctrl+C copy current line (if no selection)
Ctrl+X cut current line (if no selection)
Ctrl+⇧+K delete line
Ctrl+↩ insert line after