Skip to content

Instantly share code, notes, and snippets.

Wellington Torrejais da Silva wellington1993

Block or report user

Report or block wellington1993

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View ruby-versions-rails-Compatibility.txt
I have an old 2.1.1 Ruby on Rails application, with the system upgraded to use Ruby 1.8.7. It originally used 1.8.5 or so.
I want to upgrade it to Ruby 1.9.x for performance reasons, and possibly to a newer Ruby on Rails as well.
I cannot find any easy chart of compatibility between different Ruby versions and Ruby on Rails versions.
Will 2.1.1 work with Ruby 1.9.x? If not, how far do I need to upgrade it first, and what kind of issues am I likely to encounter? My application does complicated things to database layer, but the rest is fairly straightforward.
ruby-on-rails ruby
sudo apt autoremove -y; sudo apt update; sudo apt upgrade -y; sudo apt dist-upgrade -y; sudo snap refresh ; sudo apt autoremove -y; sudo apt full-upgrade -y ; for s in $(snap list |cut -d' ' -f1|sort -u);do sudo snap refresh --edge $s ; done
wellington1993 / kinto-http-client.js
Created Jul 16, 2019
View kinto-http-client.js
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
View PageStyleChild.jsm
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at */
const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
var EXPORTED_SYMBOLS = ["PageStyleChild"];
const { ActorChild } = ChromeUtils.import(
wellington1993 / Browser-Console-Slowdown-with-Google-Docs.js
Last active Jul 11, 2019
Browser Console Slowdown with Google Docs
View Browser-Console-Slowdown-with-Google-Docs.js
A script on this page may be busy, or it may have stopped responding. You can stop the script now, open the script in the debugger, or let the script continue.
Script: resource://devtools/client/web…onents/Output/ConsoleOutput.js:188
View Error-Sync-502-Firefox.js
1562867731588 Sync.Engine.Extension-Storage ERROR Syncing request failed: Error: Response from server unparseable (HTTP 502; SyntaxError: JSON.parse: unexpected character at line 2 column 1 of the JSON data):
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<title>502 Server Error</title>
<body text=#000000 bgcolor=#ffffff>
<h1>Error: Server Error</h1>
<h2>The server encountered a temporary error and could not complete your request.<p>Please try again in 30 seconds.</h2>
View get-ruby-https-head.rb
# require 'openssl'
# require 'net/http'
# require 'net/https'
url = ''
uri = URI(url)
wellington1993 / nil_empty_blank_present_ffdierence_in_ruby Difference between nil?, empty?, blank? and present? in Ruby and Ruby on Rasils.
View nil_empty_blank_present_ffdierence_in_ruby
# nil? can be used on any Ruby object. It returns true only if the object is nil.
nil.nil? # => true
[].nil? # => false
{}.nil? # => false
"".nil? # => false
" ".nil? # => false
true.nil? # => false
# empty? can be used on some Ruby objects including Arrays, Hashes and Strings. It returns true only if the object's length is zero.
nil.empty? # NoMethodError: undefined method `empty?' for nil:NilClass
1562248321556 FirefoxAccounts TRACE finished write of user data to the login manager
Extension error: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMWindowUtils.removeSheetUsingURIString]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: resource://gre/modules/ExtensionCommon.jsm :: runSafeSyncWithoutClone :: line 65" data: no] undefined 65
[[Exception stack
Current stack
View gems-rails5-project-example.yaml
*** LOCAL GEMS ***
actioncable (5.2.3, 5.2.1, 5.1.7,
actionmailer (5.2.3, 5.2.1, 5.1.7,
actionpack (5.2.3, 5.2.1, 5.1.7,
actionview (5.2.3, 5.2.1, 5.1.7,
active_model_serializers (0.10.9)
activejob (5.2.3, 5.2.1, 5.1.7,
activemodel (5.2.3, 5.2.1, 5.1.7,
activerecord (5.2.3, 5.2.1, 5.1.7,
You can’t perform that action at this time.