Instantly share code, notes, and snippets.

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
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