Taken from: http://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-test.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env zsh | |
if ! type prlctl &> /dev/null ; then | |
print -u 2 -- "command not found: prlctl" | |
print -u 2 -- "Parallels might not be installed" | |
return 1 | |
fi | |
if ! type fzf &> /dev/null ; then | |
print -u 2 -- "command not found: fzf" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
en: | |
activerecord: | |
errors: | |
messages: | |
array: | |
default: "has invalid values: %{invalid_values}" | |
absence: "has non-blank values: %{invalid_values}" | |
presence: "has blank values: %{invalid_values}" | |
format: "has invalid values: %{invalid_values}" | |
exclusion: "has reserved values: %{invalid_values}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "open-uri" | |
require "net/http" | |
Error = Class.new(StandardError) | |
DOWNLOAD_ERRORS = [ | |
SocketError, | |
OpenURI::HTTPError, | |
RuntimeError, | |
URI::InvalidURIError, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
extension Int { | |
func abbreviate() -> String { | |
typealias Abbrevation = (threshold: Double, divisor: Double, suffix: String) | |
let abbreviations: [Abbrevation] = [ | |
(0, 1, ""), | |
(1000.0, 1000.0, "K"), | |
(100_000.0, 1_000_000.0, "M"), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# frozen_string_literal: true | |
class ExampleClass | |
PI = 3.14159265359 | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# frozen_string_literal: true | |
RSpec::Matchers.alias_matcher :increment, :change do |desc| | |
desc.gsub("changed", "incremented").gsub("change", "increment") | |
end | |
RSpec::Matchers.alias_matcher :decrement, :change do |desc| | |
desc.gsub("changed", "decremented").gsub("change", "decrement").gsub("-", "") | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# frozen_string_literal: true | |
# `have_attr_reader` matcher for attr_reader | |
RSpec::Matchers.define :have_attr_reader do |field| | |
match do |object_instance| | |
object_instance.respond_to?(field) | |
end | |
failure_message do |object_instance| | |
"expected attr_reader for #{field} on #{object_instance}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
git add -A && git commit -m "$(curl -s whatthecommit.com/index.txt)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#3366CC | |
#DC3912 | |
#FF9900 | |
#109618 | |
#990099 | |
#3B3EAC | |
#0099C6 | |
#DD4477 | |
#66AA00 | |
#B82E2E |
NewerOlder