recentpopularlog in

rtopitt : ruby   822

« earlier  
octokit/octokit.rb: Ruby toolkit for the GitHub API
Ruby client to the GitHub REST API

Good example and reference of best practice implementation of this kind of API client
api  gem  github  ruby  reference  boa_prática  rest  exemplo  inspiração  http 
10 weeks ago by rtopitt
Improve your Ruby application's memory usage and performance with jemalloc
Using a different memory allocation library, you can reduce your Ruby application’s memory usage and response time. Learn how to use it on a hosting service (like Heroku or Scalingo) or your own server.
ruby  memory  performance  how-to  heroku  server  configuration  library 
april 2018 by rtopitt
Best Ruby & Ruby on Rails Resources | Leigh Halliday
I wanted to compile an ultimate list of Ruby resources, books, courses, people to follow, etc... This list contains resources I have used over the years while learning and writing Ruby (on Rails) professionally. My goal is to keep this list up to date as I discover (or am recommended) new resources. So many lists were great in 2015, but fall behind. That won't be the case with this one. Feel free to recommend any useful resources to me on Twitter @leighchalliday.
ruby  learning  programming  top10  lista  reference  rails 
march 2018 by rtopitt
kleaver/rumbda: Run ruby scripts on aws lambda.
Rumbda does everything necessary to build a zip file for running ruby inside of an AWS Lambda. This includes downloading traveling ruby, creating a bundle of the project's Gemfile dependencies, and creating a consumable .zip file for use with Lambda.
ruby  lambda  aws  gem  github  amazon  serverless 
december 2017 by rtopitt
Traveling Ruby: self-contained, portable Ruby binaries
Easily ship Ruby apps to end users. Traveling Ruby lets you create self-contained Ruby app packages for Windows, Linux and OS X.
ruby  app  cli  deploy  mac_os_x  windows  linux  unix  software_livre  package 
december 2017 by rtopitt
Ruby on Rails implementation of a (proper) Ranking/Popularity system |
Cálculo de popularidade / qualidade de um objeto baseado em votos positivos e negativos levando em conta a quantidade de votos e razão entre tipos de votos
programming  matemática  estatística  ruby  tip  how-to  reference  ranking 
november 2016 by rtopitt
ankane/shorts: Short, random tutorials and posts
Short, random tutorials and posts about Ruby and Rails
ruby  rails  programming  how-to  tip  tutorial  reference  top10  github 
june 2016 by rtopitt
ankane/the-ultimate-guide-to-ruby-timeouts: :clock4:
An unresponsive service is worse than a down one. It can tie up your entire system if not handled properly. All network requests should have a timeout.

Here’s how to add timeouts for popular Ruby gems. All have been tested. You should avoid Ruby’s Timeout module. The default is no timeout, unless otherwise specified. Enjoy!
ruby  timeout  programming  github  gem  how-to  tip  reference  library  network 
june 2016 by rtopitt
donmelton/video_transcoding: Tools to transcode, inspect and convert videos.
Hi, I'm Don Melton. I created these tools to transcode my collection of Blu-ray Discs and DVDs into a smaller, more portable format while remaining high enough quality to be mistaken for the originals.

What makes these tools unique are the ratecontrol systems which achieve those goals.

This package is based on my original collection of Video Transcoding Scripts written in Bash. While still available online, those scripts are no longer in active development. Users are encouraged to install this Ruby Gem instead.
transcoding  video  conversão  conversor  gem  ruby  shell  console  reference  utilidade  bluray  dvd  software_livre 
june 2016 by rtopitt
Create beautiful Javascript charts with one line of Ruby
javascript  ruby  highcharts  google_charts  gráfico  biblioteca  gem  rails 
june 2016 by rtopitt
Ruby - Hashids
generate short unique ids from integers

Hashids is a small open-source library that generates short, unique, non-sequential ids from numbers.

It converts numbers like 347 into strings like “yr8”, or array of numbers like [27, 986] into “3kTMd”.

You can also decode those ids back. This is useful in bundling several parameters into one or simply using them as short UIDs.
ruby  biblioteca  criptografia  gem  id  hash  software_livre  database 
august 2015 by rtopitt
Guides for getting things done, programming well, and programming in style.
github  ruby  reference  programming  guia  how-to  estilo  linguagem  git  ios  rails  boa_prática 
april 2015 by rtopitt
Ruby in Production: Lessons Learned — Medium
Having deployed a variety of Ruby apps (Rails and non-Rails) over the course of many years, here are some lessons I’ve learned to keep things afloat. Tools like Mina and Capistrano already do most of these (more on that further down), but its good to have a first-hand understanding of what needs to happen.
rails  ruby  devops  sysadmin  server  boa_prática  tip  top10  deploy  reference  linux  unix  produção 
march 2015 by rtopitt
Create beautiful Javascript charts with one line of Ruby. Also available in Python and pure JavaScript.
ruby  gráfico  estatística  gem  interface  html  javascript 
march 2015 by rtopitt
GreenOnion | UI testing/diffing tool
GreenOnion records 'skins', which are snapshots of the current state of a view (or any page that a browser can navigate to). The first time that it is run on a view, it saves the skin; the second time that it is run, it will compare the first skin to the fresh (new) skin. You can either compare with a diff image that is automatically created, or by an outputted percentage of difference.
ruby  rspec  tdd  bdd  interface  ui  diff  gem  comparação 
march 2015 by rtopitt
Name your gem - RubyGems Guides
Here are some examples of our recommendations for naming gems.
ruby  gem  guia  how-to  convention  guideline  naming  reference 
november 2014 by rtopitt
Ferramentas para avaliação de qualidade de código Ruby - Guilherme Garnier
Ferramentas para avaliar a qualidade do seu código existem aos montes, para qualquer linguagem de programação. Eu já utilizei algumas para Java, mas nunca tinha testado nenhuma para Ruby, apesar de ser a linguagem que mais uso há alguns anos. Por isso, resolvi testar todas as ferramentas que pude encontrar. Separei a avaliação entre serviços e ferramentas.
ruby  gem  ferramenta  código-fonte  review  service  qualidade  programming  top10  how-to 
november 2014 by rtopitt
Volt is a framework for building data rich web applications shockingly fast. Volt is a reactive web framework where your Ruby code runs both on the server and the client (via opal). The DOM automatically updates as the user interacts with the page, intelligently updating only the nodes that need to be changed. Data can easily be stored on the page, in a cookie, or in a database powered by MongoDB. Take a look at the demo below, or jump into getting started.
framework  javascript  ruby  webapp  software_livre 
november 2014 by rtopitt
Opal: Ruby to Javascript Compiler
It is source-to-source, making it fast as a runtime. Opal includes a compiler (which can be run in any browser), a corelib and runtime implementation. The corelib/runtime is also very small.
javascript  ruby  programming  compiler  webapp  browser  software_livre 
november 2014 by rtopitt
The goal of this guide is to present a set of best practices and style prescriptions for Ruby on Rails 4 development. It's a complementary guide to the already existing community-driven Ruby coding style guide.
rails  ruby  style  guide  programming  boa_prática  modelo  inspiração 
october 2014 by rtopitt
Observer Pattern in RUBY — Medium
In this quick article we’re going to go over the Observer Pattern. The observer pattern is used when you are building a system where the state of one object effects the state of other objects.
design_patterns  boa_prática  ruby  programming  how-to  reference  oop  ood 
october 2014 by rtopitt
How to Build Authentication in Rails
Authentication is the process of establishing, and subsequently confirming, a site user’s identity. It is how an app recognises, who you are. In this article, we’ll go through a few methods that you can add authenticate to your Rails application. We’ll start with the HTTP Basic Authentication, look at the most commonly used username and password based local authentication, and then some less known alternatives.
rails  ruby  http  review  autenticação  security  webapp 
september 2014 by rtopitt
Don’t Daemonize your Daemons! | Mike Perham
Modern best practices to create a long-lived daemon process on Unix-based systems.
ruby  devops  programming  melhores_práticas  daemon  how-to  tip  unix  linux 
september 2014 by rtopitt
Ruby packages for Ubuntu | Brightbox Cloud
Brightbox have been providing optimised Ruby packages for Ubuntu for years. We’re currently maintaining packages for Ruby 1.8.7, 1.9.3, 2.0 and 2.1.
ruby  ubuntu  apt  deb  pacote  repositório  software_livre 
september 2014 by rtopitt
Http::Exceptions provides an easy way to rescue exceptions that might be thrown by your Http library. If you're using a library such as the excellent HTTParty, you still have to deal with various types of exceptions. In an ideal world, the return code of the HTTP request would be the sole indicator of failures, but HTTP libraries can raise a large number of exceptions (such as SocketError or Net::ReadTimeout) that you need to handle. Http::Exceptions converts any error that might be raised by your HTTP library and wrap it in a Http::Exceptions::HttpException.
ruby  http  httparty  rails  exceção  gem 
september 2014 by rtopitt
Andrew Kane took a Heroku blog post about getting insights in to your PostgreSQL database and ran with it, creating a nice dashboard you can mount in your Rails app as an engine. PgHero will show you long running queries, cache hit rate, and more.
postgresql  rails  ruby  dashboard  sql  performance  check  otimização  engine 
july 2014 by rtopitt
Home | kramdown
kramdown (sic, not Kramdown or KramDown, just kramdown) is a free MIT-licensed Ruby library for parsing and converting a superset of Markdown. It is completely written in Ruby, supports standard Markdown (with some minor modifications) and various extensions that have been made popular by the PHP Markdown Extra package and Maruku. It is probably the fastest pure-Ruby Markdown converter available (March 2013), being about 4x faster than Maruku and about 5x faster than BlueFeather.
markdown  ruby  library  gem  syntax  format  text 
july 2014 by rtopitt
This is a curated collection of essential Ruby and Ruby on Rails resources. The project aims to maintain a well-structured reference equally useful both for beginners and advanced web developers. ★ stands here for Editors' Choice.
ruby  rails  learning  resources  livro  link  top10  programming  linguagem 
july 2014 by rtopitt
Structuring Sinatra Applications
I love Sinatra. I use it for practically everything. For me, Sinatra has the perfect blend of simplicity and abstraction. I can understand the full stack, dip into the source when I need to, and extend the framework how I see fit.

However the bare-bones nature of Sinatra can come at a cost. Sinatra leaves much more of the decision making around your application's structure, layout and libraries up to you. This can be a bit daunting if you're just getting into Ruby web app development, which I think is one of the reasons why Sinatra is mainly the realm of more experienced developers looking for a bloat-free alternative to Rails.

Over the years I've put together a few conventions that I share between all my Sinatra apps, and in this article I'm going to elaborate on those. I've also created a gem called Trevi which, if you want to follow this approach, will go ahead and do all the manual lifting for you by generating a Sinatra scaffold.
webapp  sinatra  ruby  tip  how-to  configuration  gem  estrutura 
july 2014 by rtopitt
Publisher: RSpec - Relish
This is the official documentation site for RSpec. RSpec is a Behaviour-Driven Development tool for Ruby programmers. BDD is an approach to software development that combines Test-Driven Development, Domain Driven Design, and Acceptance Test-Driven Planning. RSpec helps you do the TDD part of that equation, focusing on the documentation and design aspects of TDD.
bdd  rails  rspec  ruby  documentação  manual  exemplo  reference  tdd  teste 
july 2014 by rtopitt
Ruby Refactoring Cheatsheet
An outline the refactoring book by Jay Fields, et al. This is my aide-mémoire for the Hogwarts-style names of the Spells and Smells and is unlikely to be of much use to anyone who hasn't read the book.
ruby  refactoring  programming  tip  cheat_sheet  book  guide 
june 2014 by rtopitt
Open Data Scripts for Wikipedia - Turn Free-Style (or Semi-Structured) Text into Structured Data
wiki  wikipedia  ruby  script  open_data  repositório 
june 2014 by rtopitt
pandurang_w: Client side SSL Certificate Authentication with Rails and Nginx
Recently i worked on one application which required SSL client certificate based authentication. So just wanted to share it with you all about how it can be integrated in Rails application.This article is about using SSL certificates installed into a web browser to authenticate against a Ruby on Rails application with Nginx.
ruby  rails  nginx  openssl  ssl  certificado  security  how-to  tip  webapp  ca 
june 2014 by rtopitt
7 Patterns to Refactor Fat ActiveRecord Models - Code Climate Blog
When teams use Code Climate to improve the quality of their Rails applications, they learn to break the habit of allowing models to get fat. “Fat models” cause maintenance issues in large apps. Only incrementally better than cluttering controllers with domain logic, they usually represent a failure to apply the Single Responsibility Principle (SRP). “Anything related to what a user does” is not a single responsibility.

Early on, SRP is easier to apply. ActiveRecord classes handle persistence, associations and not much else. But bit-by-bit, they grow. Objects that are inherently responsible for persistence become the de facto owner of all business logic as well. And a year or two later you have a User class with over 500 lines of code, and hundreds of methods in it’s public interface. Callback hell ensues.

As you add more intrinsic complexity (read: features!) to your application, the goal is to spread it across a coordinated set of small, encapsulated objects (and, at a higher level, modules) just as you might spread cake batter across the bottom of a pan. Fat models are like the big clumps you get when you first pour the batter in. Refactor to break them down and spread out the logic evenly. Repeat this process and you’ll end up with a set of simple objects with well defined interfaces working together in a veritable symphony.
design  rails  ruby  how-to  top10  inspiração  modelagem  model  orientação_a_objetos  srp  reference  refactoring  tip  programming 
may 2014 by rtopitt
Back to Basics: Regular Expressions
Regular expressions have been around since the early days of computer science. They gained widespread adoption with the introduction of Unix. A regular expression is a notation for describing sets of character strings. They are used to identify patterns within strings. There are many useful applications of this functionality, most notably string validations, find and replace, and pulling information out of strings.

Regular expressions are just strings themselves. Each character in a regular expression can either be part of a code that makes up a pattern to search for, or it can represent a letter, character or word itself. Let’s take a look at some examples.
ruby  regex  string  reference  tip  programming 
may 2014 by rtopitt
Guarding with arrays
This week I applied a pattern I've been using for years to two separate pull requests from our devs. In both cases I was able to help them refactor their code to use an enumerator as code guards instead of conditional statements.
ruby  boa_prática  array  refactoring  tip  programming 
may 2014 by rtopitt
Document Explicit Dependencies Through Tests
Being conscious about what must be required for a particular source file is a good thing. Instead of loading everything but the kitchen sink through the spec_helper, let’s specify the minimum dependencies inside of the test.
rspec  rails  ruby  teste  dependência  performance  boa_prática  tdd 
may 2014 by rtopitt
Welcome - world.db - Open Mundi - Open World Data
A free open public domain world database ‘n’ schema for use in any (programming) language (e.g. uses plain text fixtures/data sets)
gem  ruby  mundo  país  cidade  local  reference  database 
march 2014 by rtopitt
Inch · A documentation measurement tool for Ruby
A documentation tool for the Ruby programming language. Inch is a command-line tool that gives you hints where to improve your docs. One Inch at a time. Inch was created to help people document their code, therefore it may be more important to look at what it does not do than at what it does. Inch takes a more relaxed approach towards documentation measurement and tries to show you places where your codebase could use more documentation.
documentação  ruby  gem  incentivo  programming 
march 2014 by rtopitt
Persisting data in Ruby with PStore — The blog of Rob Miller, Ruby developer
Wouldn’t it be nice if there was a hash or hash-like data structure that persisted itself to disk for us, without us having to worry about serialising data or writing files?
ruby  serialização  standard_lib  biblioteca  how-to  datastore  tip  programming 
january 2014 by rtopitt
VCR e dados sensíveis como email e senha | Groselhas - O blog do Mauro George (@maurogeorge)
Quando estamos utilizando o VCR em nossas specs podemos nos deparar com o seguinte problema: como passar dados sensíveis ao VCR, como senhas e emails, mais não salvar isto em nosso cassete?
vcr  rspec  ruby  privacidade  teste  software_livre  tip  programming 
january 2014 by rtopitt
How To Create PDFs in Rails | Viget
Ultimately, I found Wicked PDF to be the best choice due to: ease of setup, ease of using different layouts and assets for PDFs, and excellent documentation and examples. Some of the examples included how to use assets on Heroku, assets from a CDN, using the asset helper methods, and how to generate and download files using send_file.
pdf  rails  ruby  gem  how-to  download  geração  html  tip 
december 2013 by rtopitt
Lita by jimmycuadra
Lita is a chat bot written in Ruby with persistent storage provided by Redis. It can connect to any chat service (given that there is an adapter available for it) and can have new behavior added via handlers. The plugin system is managed with regular RubyGems and Bundler.

Automate your business and have fun with your very own robot companion.
bot  chat  irc  ruby  hipchat  software_livre  gem  server 
december 2013 by rtopitt
UltraHook - Receive webhooks on localhost
UltraHook makes it super easy to connect public webhook endpoints with development environments. UltraHook is the simplest way to receive webhooks behind a firewall. Webhooks are HTTP requests made over the web by services when certain events are triggered within the services. Many popular services (GitHub, Stripe, ActiveCampaign, Papertrail, etc) support updates via webhooks. However, since these webhook requests are made over the public web, it's difficult receive them when testing from behind a firewall. This is where UltraHook comes in - it provides you a public endpoint to give to other services and tunnels requests to a private endpoint on your computer.
http  ruby  gem  webapp  grátis  webhook  api  utilidade  service 
december 2013 by rtopitt
Easy database migration using Taps(-taps) - Blog - Shelly Cloud
Migrating databases from one host to another can be a boring and time consuming task. Usually you need to make a database dump on the host A, compress it, transfer it to the host B, uncompress it and finally load it into the database. Things get even more complicated when we want to transfer database to a different database engine, say from MySQL to PostgreSQL.

Fortunately there is taps. It's a tool for migrating databases. From this post you will learn how to use it, how it works and how to resolve its most common problems.
migração  ruby  sql  mysql  postgresql  exemplo  how-to  gem  conversão  server  tip  database 
november 2013 by rtopitt
Faye: Simple pub/sub messaging for the web
Faye is a publish-subscribe messaging system based on the Bayeux protocol. It provides message servers for Node.js and Ruby, and clients for use on the server and in all major web browsers.
javascript  ruby  mensagem  pubsub  node.js  bayeux  cliente  biblioteca  server 
october 2013 by rtopitt
APIfy converts data in existing HTML sites and wikipedia pages to JSON APIs.

APIs can be consumed from Ruby , Python , PHP, Node.js, iPhone, Android apps.

Javascript and Phonegap apps can use JSONP to consume API without a backend.

APIfy is built using ScrApify gem.
api  heroku  html  json  scraping  gem  ruby  wikipedia  webservice 
september 2013 by rtopitt
How I Made My Ruby Project 10x Faster -
This post is about how I got a 10x speedup for my ruby gem contracts.ruby.
contracts.ruby is my project to add code contracts to Ruby.
ruby  performance  how-to  benchmark  tip 
august 2013 by rtopitt
Advanced Caching in Rails: Revised
This series means to teach you everything you need to know to implement any different caching level inside your Rails application. It assumes you know nothing at all about caching in any of its forms. It takes from zero to knowledge to an intermediate level in all areas. If you can't implement caching in your app after reading this then I've failed.
rails  cache  performance  webapp  memcached  ruby  api  json  http  compilation  tip 
july 2013 by rtopitt
Working with time zones in Ruby on Rails — Elabs
Rails provides great tools for working with time zones but there’s still a lot of things that can go wrong. This blog post aims to shed some light on these gotchas and provide solutions to the most common problems.
rails  tempo  data  hora  timezone  utc  importante  teste  ruby  cheat_sheet  tip 
june 2013 by rtopitt
Evitando problemas com datas e time zones no Rails - Blog da HE:labs
Volta e meia passo por alguns problemas com time zones no Rails. Hoje, demonstrarei algumas dicas para evitá-los.
rails  tempo  data  hora  timezone  utc  importante  teste  ruby  tip 
june 2013 by rtopitt
How do I benchmark Ruby code?
Ruby’s standard library comes with a benchmarking library fit for measuring the execution time of your Ruby code. The Benchmark module offers several different ways for you to benchmark your code. I’ll take you through the different options and their use cases.
ruby  benchmark  teste  performance  artigo  how-to  biblioteca  analysis  tip  programming 
june 2013 by rtopitt
Rails Integration Gems | Heroku Dev Center
Rails 4 requires a gem rails_on_heroku in order to configure your application logs to be visable via heroku logs and to serve static assets.
rails  4  heroku  gem  plugin  integração  webapp  ruby  importante  dependência  tip 
june 2013 by rtopitt
A better way to manage the Rails secret token - Daniel Fone
tl;dr Don’t hardcode secret tokens. Load them from the environment like this…
rails  ruby  env  token  segredo  cookie  environment  security  server  configuration  tip 
june 2013 by rtopitt
jetrockets/attrio · GitHub
Attributes for plain old Ruby objects. No dependencies, only simplicity and clearness.
gem  model  ruby  atributo  modelo  objeto  importante  inspiração 
june 2013 by rtopitt
API with Ruby on Rails: useful tricks | Railsware Blog
This article is about gotchas you should be aware of while building your API with Ruby on Rails.
api  rails  ruby  tip 
june 2013 by rtopitt
When upgrading the version of Rails used in an application, it can be difficult to know precisely every detail that should be changed.

So, to that end, I've generated applications for each version of Rails; and, for each version, I've generated a diff between it and all versions before it. You can use these diffs to know precisely every change needed to upgrade to any version of Rails.
rails  upgrade  diff  importante  comparação  esqueleto  atualização  ruby  reference 
june 2013 by rtopitt
intridea/grape · GitHub
Grape is a REST-like API micro-framework for Ruby. It's designed to run on Rack or complement existing web application frameworks such as Rails and Sinatra by providing a simple DSL to easily develop RESTful APIs. It has built-in support for common conventions, including multiple formats, subdomain/prefix restriction, content negotiation, versioning and much more.
api  framework  rails  rest  ruby  json  biblioteca  gem 
june 2013 by rtopitt
Raising and Rescuing Custom Errors in Rails | We Are Stac
In this post we'll demonstrate rescuing status errors in an imaginary proxy controller using the awesome Faraday gem. For the sake of brevity we've omitted the inclusion of tests though in the wild we'd build such a feature using TDD and our favourite test weapon, RSpec.
erro  rails  ruby  exceção  how-to  blog  tip 
june 2013 by rtopitt
Go for Rubyists :: A Ruby-Tinted Introduction to Programming Go
Go for Rubyists is the first book for the Go-curious who see programming through Ruby-colored glasses. Go and Ruby share a surprising amount of similarity, given their distinct aims and origins, so Go is more approachable than most languages of its kind to the inquisitive Ruby programmer.
ruby  go  golang  livro  beta  linguagem  learning  programming 
june 2013 by rtopitt
Rails SQL Injection Examples
This page lists many query methods and options in ActiveRecord which do not sanitize raw SQL arguments and are not intended to be called with unsafe user input. Careless use of these methods can open up code to SQL Injection exploits. The examples here do not include SQL injection from known CVEs and are not vulnerabilites themselves, only potential misuses of the methods.

Please use this list as a guide of what not to do.
rails  ruby  sql  injection  bug  hack  active_record  how-to  boa_prática  security  compilation  database 
june 2013 by rtopitt
Creating temporary files securely | Kurt Seifried
Creating temporary files  is a common use case in virtually every program. Virtually every programming language has a simple and secure way to create temporary files. Sadly many programmers fail to use them, creating security vulnerabilities in their applications. So in alphabetical order here is a list of programming languages and how to create a temporary file securely.
how-to  importante  arquivo  temporário  programa  linguagem  ruby  reference  security  tip 
june 2013 by rtopitt
Secure Salted Password Hashing - How to do it Properly
There are a lot of conflicting ideas and misconceptions on how to do password hashing properly, probably due to the abundance of misinformation on the web. Password hashing is one of those things that's so simple, but yet so many people get wrong. With this page, I hope to explain not only the correct way to do it, but why it should be done that way.
hash  salt  criptografia  how-to  senha  sal  ruby  rails  web  security  tip 
june 2013 by rtopitt
« earlier      
per page:    204080120160

Copy this bookmark:

to read