Instantly share code, notes, and snippets.

🐻
Busy
My working day may not be your working day. Please don't feel obliged to reply!

Juanito Fatas JuanitoFatas

View GitHub Profile
View xmas
#!/usr/bin/env ruby
[*0..5, *2..8, *3..12, 2, 2, 2, 2].each { |i| puts ' '*(40-2*i-i/2)+'*'*(4*i+1+i) }
View cprl.md
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
View twemoji-js-v2-unicodes
"🀄"
"🃏"
"🅰"
"🅱"
"🅾"
"🅿"
"🆎"
"🆑"
"🆒"
"🆓"
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
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