create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"
| require 'socket' | |
| webserver = TCPServer.new('127.0.0.1', 7777) | |
| puts "Iniciando servidor." | |
| while (session = webserver.accept) | |
| session.print "HTTP/1.1 200/OK\r\nContent-type:text/html\r\n\r\n" | |
| begin |
| class PostsController < ActionController::Base | |
| def create | |
| Post.create(post_params) | |
| end | |
| def update | |
| Post.find(params[:id]).update_attributes!(post_params) | |
| end | |
| private |
Prereq:
apt-get install zsh
apt-get install git-coreGetting zsh to work in ubuntu is weird, since sh does not understand the source command. So, you do this to install zsh
wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh
| # encoding: utf-8 | |
| class AvatarUploader < CarrierWave::Uploader::Base | |
| include CarrierWave::MiniMagick | |
| # Choose what kind of storage to use for this uploader: | |
| storage :file | |
| # Override the directory where uploaded files will be stored. |
| # Author: Pieter Noordhuis | |
| # Description: Simple demo to showcase Redis PubSub with EventMachine | |
| # | |
| # Update 7 Oct 2010: | |
| # - This example does *not* appear to work with Chrome >=6.0. Apparently, | |
| # the WebSocket protocol implementation in the cramp gem does not work | |
| # well with Chrome's (newer) WebSocket implementation. | |
| # | |
| # Requirements: | |
| # - rubygems: eventmachine, thin, cramp, sinatra, yajl-ruby |