Skip to content

Instantly share code, notes, and snippets.

View just806me's full-sized avatar
🇺🇦

Just Me just806me

🇺🇦
View GitHub Profile

Keybase proof

I hereby claim:

  • I am just806me on github.
  • I am just806me (https://keybase.io/just806me) on keybase.
  • I have a public key ASDcHIBpiNcDReVtuIdFk3ODRS1qFMakwvFSinDL35atFwo

To claim this, I am signing this object:

@just806me
just806me / index.css
Created July 2, 2020 16:26
Using Action Text from React App
/*
* We need to override trix.css’s image gallery styles to accommodate the
* <action-text-attachment> element we wrap around attachments. Otherwise,
* images in galleries will be squished by the max-width: 33%; rule.
*/
.trix-content .attachment-gallery > action-text-attachment,
.trix-content .attachment-gallery > .attachment {
flex: 1 0 33%;
padding: 0 0.5em;
function getProperties(prefix, obj) {
if (obj === null || obj === undefined) {
return [];
}
if (obj instanceof Blob || obj instanceof File) {
return [{ name: prefix, value: obj }];
}
if (typeof obj !== 'object') {
LETTER_REGEX = /^[[:alpha:]]$/u.freeze
line = STDIN.gets.downcase
dict = Hash.new 0
line.each_char { |c| dict[c] += 1 if c =~ LETTER_REGEX }
dict.sort_by { |key, value| value }.reverse.each { |key, value| puts "#{ key }: #{ value }" }