Skip to content

Instantly share code, notes, and snippets.

View RenatoRosaFranco's full-sized avatar
🎯
Focusing on quality code.

Renato Rosa Franco RenatoRosaFranco

🎯
Focusing on quality code.
View GitHub Profile
@danopia
danopia / database.yml
Created April 25, 2011 04:19
Default SQLite database.yml
# SQLite version 3.x
# gem install sqlite3-ruby (not necessary on OS X Leopard)
development:
adapter: sqlite3
database: db/development.sqlite3
pool: 5
timeout: 5000
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
@lancejpollard
lancejpollard / meta-tags.md
Created March 5, 2012 13:54
Complete List of HTML Meta Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta name="keywords" content="your, tags"/>
<meta name="description" content="150 words"/>
<meta name="subject" content="your website's subject">
<meta name="copyright"content="company name">
<meta name="language" content="ES">
@iros
iros / API.md
Created August 22, 2012 14:42
Documenting your REST API

Title

<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>

  • URL

    <The URL Structure (path only, no root url)>

  • Method:

@samiron
samiron / comments_controller.rb
Created September 19, 2012 07:26
Sample Rails Controller
class CommentsController < ApplicationController
# GET /comments
# GET /comments.json
def index
@comments = Comment.all
respond_to do |format|
format.html # index.html.erb
format.json { render json: @comments }
end
@jwo
jwo / mysql.database.yml
Last active March 28, 2024 15:32
Sample config/database.yml from Rails. Postgres, MySQL, and SQLite
#
# Install the MYSQL driver
# gem install mysql2
#
# Ensure the MySQL gem is defined in your Gemfile
# gem 'mysql2'
#
# And be sure to use new-style password hashing:
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html
development:
@ChuckJHardy
ChuckJHardy / example_activejob.rb
Last active June 28, 2024 12:52
Example ActiveJob with RSpec Tests
class MyJob < ActiveJob::Base
queue_as :urgent
rescue_from(NoResultsError) do
retry_job wait: 5.minutes, queue: :default
end
def perform(*args)
MyService.call(*args)
end
@ThomasBush
ThomasBush / youtube-video-commands
Last active February 11, 2024 03:21
Ubuntu 20.04 Focal Fossa Rails server setup
# Generate Random Passwords
curl 'https://www.random.org/passwords/?num=2&len=24&format=plain&rnd=new'
# Create deploy user
sudo adduser deploy
sudo adduser deploy sudo
su deploy
cd ../deploy/
# Generate ssh keys