Skip to content

Instantly share code, notes, and snippets.

View vbrazo's full-sized avatar
:octocat:
Open source for humanity!

Vitor Oliveira vbrazo

:octocat:
Open source for humanity!
View GitHub Profile

List of companies using Ruby on Rails

  • figma.com
  • tesla.com (Tesla motors)
  • meetup.com
  • dribbble.com
  • fiverr.com
  • basecamp.com
  • notonthehighstreet.com
  • goodreads.com
@Mardiniii
Mardiniii / push_pull_heroku_database.md
Last active February 23, 2024 09:19
Pull and push DATABASE with Heroku

# Some tips to pull and push a database with Heroku

Some tips to improve test flow dealing with database on local and production environments.

I. Pull database from Heroku

It is really usefull if you want to fill your local database with real data from production environment.

1. Drop Local Database

@speric
speric / poodir-notes.md
Last active January 24, 2024 10:31
Notes From "Practical Object-Oriented Design In Ruby" by Sandi Metz

Chapter 1 - Object Oriented Design

The purpose of design is to allow you to do design later, and it's primary goal is to reduce the cost of change.

SOLID Design:

  • Single Responsibility Principle: a class should have only a single responsibility
  • Open-Closed Principle: Software entities should be open for extension, but closed for modification (inherit instead of modifying existing classes).
  • Liskov Substitution: Objects in a program should be replaceable with instances of their subtypes without altering the correctness of that program.
  • Interface Segregation: Many client-specific interfaces are better than one general-purpose interface.
@paulnsorensen
paulnsorensen / foo.rb
Last active September 5, 2019 19:05
UPDATE: I have way better code that accomplishes this now at [https://github.com/paulnsorensen/lifesaver] Module to ease associated models that are indexed by tire. Use this to trigger reindexing instead of having to touch all the files.
#
# Please go to https://github.com/paulnsorensen/lifesaver
#
class Foo < ActiveRecord::Base
has_many :bars
belongs_to :baz
include IndexingHandler
indexed_associations :bars, :baz
end
@barnes7td
barnes7td / sublime_plugins.md
Created October 5, 2012 02:07
Sublime Plugins for Ruby and Rails

Sublime Plugins for Ruby and Rails

General

I would start by installing the Sublime Package Control manager. This tool will allow you to install the other plugins without having to clone git repositories and copying them to the correct folders. Instead you will the command drop-down menu with "Ctrl + Shift + P" and then scrolling down until you see "Package Control: Install Package". A search bar will pop up and you can type the name of a package, click on the name and it will self install. If you have problems setting any of these up email me at barnes7td@gmail.com

Packages/Plugins

  1. Sublime Package Control - Install this first. This tool will allow you to easily install most (if not all) the other plugins in this list. (Ctrl + Shift + P, then select Package Control: Install Package)

  2. SublimeERB - This plugin auto creates the erb tags. (<% %>, <%= %>, etc.) (Ctrl +

@Angles
Angles / Open-source-iOS-apps.md
Created July 25, 2012 19:21
real iOS apps with GitHub open source repos

Real iOS Apps in AppStore, with source on GitHub:

thanks 4 putting source for a noob to learn a little

I've used these:

@hemanth
hemanth / Faraday.md
Created June 27, 2012 06:40
HTTP client library is so convenient Faraday of Ruby

HTTP client library is so convenient Faraday of Ruby

Faraday's so convenient Ruby HTTP client library

The development of the API wrapper [RestClient gem] or I [rest_client_gem]
What you need for OAuth was using [Net / HTTP] [net_http] + [OAuth gem] the [oauth_gem]

After reading the source of the API library [Twitter gem] and [twitter_gem] [Instagram gem] such as [instagram_gem]
Thing [Faraday gem] that [faraday_gem] had been commonly used

@yaraki
yaraki / dijkstra.rb
Created February 3, 2012 13:58
Dijkstra Shortest Path Algorithm in Ruby
#!/usr/bin/ruby1.9.1 -Kw
# -*- coding: utf-8 -*-
class Edge
attr_accessor :src, :dst, :length
def initialize(src, dst, length = 1)
@src = src
@dst = dst
@length = length
@hendrikswan
hendrikswan / app.rb
Created December 20, 2011 21:29
sample sinatra mongodb service
require 'sinatra'
require 'mongoid'
require 'json'
require "sinatra/reloader" if development?
Mongoid.load!("mongoid.yml")
class Price
include Mongoid::Document