Skip to content

Instantly share code, notes, and snippets.

View vajapravin's full-sized avatar
😀
Available

vajapravin vajapravin

😀
Available
View GitHub Profile
@vajapravin
vajapravin / docker-cleanup-resources.md
Created June 14, 2018 12:39 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@vajapravin
vajapravin / 1_user.rb
Last active January 5, 2018 04:43 — forked from i-arindam/1_user.rb
class User < ApplicationRecord
has_many :posts
has_many :comments
# id :integer not null, primary key
# name :string(50) default("")
end

Figure out a good standard for how to use the HTTP response codes in a 'truly RESTful' (Now called 'Hypermedia API' apparently) way.

Summary

@vajapravin
vajapravin / tmux.conf
Last active August 29, 2015 14:11 — forked from spicycode/tmux.conf
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname

Setup PHP

apt-get install mysql-server php5-cgi php5-mysql php5-curl php5-cli

cp default-php-fastcgi /etc/default/php-fastcgi cp php-fastcgi /etc/init.d/

update-rc.d php-fastcgi defaults

What's new in Ruby on Rails 4
A RoR 4 press review
Silvio Relli @ Florence On Ruby
Bibliography and related resources
1) Rails queue
http://reefpoints.dockyard.com/ruby/2012/06/25/rails-4-sneak-peek-queueing.html
http://blog.remarkablelabs.com/2012/12/rails-queue-rails-4-countdown-to-2013
https://github.com/rails/rails/commit/adff4a706a5d7ad18ef05303461e1a0d848bd662