Skip to content

Instantly share code, notes, and snippets.

🇯🇵
Software Engineer in Japan

Juanito Fatas JuanitoFatas

🇯🇵
Software Engineer in Japan
Block or report user

Report or block JuanitoFatas

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
@JuanitoFatas
JuanitoFatas / AppAmaGooFaceSoft.md
Last active Mar 9, 2018
What is AppAmaGooFaceSoft
View AppAmaGooFaceSoft.md

AppAmaGooFaceSoft means well-established companies like Apple, Amazon, Google, Facebook, Microsoft, etc.

Coined by Patrick McKenzie, see usage.

View git-smart-push
#!/usr/bin/env ruby
# frozen_string_literal: true
# As a user,
# I want to push to my fork with current branch I'm on.
class FindMyForkRemote
def self.call
candidate = `git remote -v`.split("\n").find do |remote|
fetch_github_fork?(remote)
end
@JuanitoFatas
JuanitoFatas / parse_emoji_sources_into_regexp.rb
Created May 13, 2016
ruby parse_emoji_sources_into_regexp.rb
View parse_emoji_sources_into_regexp.rb
# frozen_string_literal: true
require "http"
def compile_for_20e3(codepoint)
codepoint.split(" ").map { |c| "\\u{#{c}}" }.join("")
end
def compile_one(codepoint)
"\\u{#{codepoint}}"
end
@JuanitoFatas
JuanitoFatas / rails-diff.sublime-snippet
Created Apr 13, 2016
Generate rails old_version..new_version diff sublime snippet
View rails-diff.sublime-snippet
<snippet>
<content><![CDATA[
Upgrade rails from ${1:old_version} to ${2:new_version}.
- Updated: [rails](http://github.com/rails/rails), [${1:old_version}...${2:new_version}](https://github.com/rails/rails/compare/v${1:old_version}...v${2:new_version})
- Updated: actionmailer, ${1:old_version}...${2:new_version} ([CHANGELOG](https://github.com/rails/rails/blob/v${2:new_version}/actionmailer/CHANGELOG.md))
- Updated: actionpack, ${1:old_version}...${2:new_version} ([CHANGELOG](https://github.com/rails/rails/blob/v${2:new_version}/actionpack/CHANGELOG.md))
- Updated: actionview, ${1:old_version}...${2:new_version} ([CHANGELOG](https://github.com/rails/rails/blob/v${2:new_version}/actionview/CHANGELOG.md))
- Updated: activejob, ${1:old_version}...${2:new_version} ([CHANGELOG](https://github.com/rails/rails/blob/v${2:new_version}/activejob/CHANGELOG.md))
- Updated: activemodel, ${1:old_version}...${2:new_version} ([CHANGELOG](https://github.com/rails/rails/blob/v${2:new_version}/activemodel/CHANGELOG.md))
View hosts
# Block Facebook IPv4
127.0.0.1 www.facebook.com
127.0.0.1 facebook.com
127.0.0.1 login.facebook.com
127.0.0.1 www.login.facebook.com
127.0.0.1 fbcdn.net
127.0.0.1 www.fbcdn.net
127.0.0.1 fbcdn.com
127.0.0.1 www.fbcdn.com
127.0.0.1 static.ak.fbcdn.net
@JuanitoFatas
JuanitoFatas / mime-types-rev-deps.md
Last active Jan 11, 2016
mime-types reversed dependencies
View mime-types-rev-deps.md

This result is from running script with "mime-types" described in What Does Your Gem Work For? by Richard Schneems.

0) mail: 49953115
1) rest-client: 27827101
2) capybara: 15186758
3) fog: 13631193
4) docile: 10018143
5) paperclip: 9840729
@JuanitoFatas
JuanitoFatas / README.md
Created Dec 18, 2015 — forked from fnichol/README.md
A Common .ruby-version File For Ruby Projects
View README.md

A Common .ruby-version File For Ruby Projects

Background

I've been using this technique in most of my Ruby projects lately where Ruby versions are required:

  • Create .rbenv-version containing the target Ruby using a definition name defined in ruby-build (example below). These strings are a proper subset of RVM Ruby string names so far...
  • Create .rvmrc (with rvm --create --rvmrc "1.9.3@myapp") and edit the environment_id= line to fetch the Ruby version from .rbenv-version (example below).

Today I learned about another Ruby manager, rbfu, where the author is using a similar technique with .rbfu-version.

You can’t perform that action at this time.