This file contains 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 "digest" | |
require "json" | |
require "net/http" | |
require "pathname" | |
require "shellwords" | |
require "tempfile" | |
MAX_REDIRECTS = 10 | |
URL = URI("https://api.snapcraft.io/v2/snaps/info/hey-mail") | |
HEADERS = { "Snap-Device-Series" => "16" } |
This file contains 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
address-book; f2b9 | |
address-card; f2bb | |
angry; f556 | |
arrow-alt-circle-down; f358 | |
arrow-alt-circle-left; f359 | |
arrow-alt-circle-right; f35a | |
arrow-alt-circle-up; f35b | |
bell; f0f3 | |
bell-slash; f1f6 | |
bookmark; f02e |
This file contains 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
= f.simple_fields_for :item do |ff| | |
.row.mt-4 | |
.col-12 | |
label Categories | |
.preview_images data-controller="has-many-fields-for" | |
.preview_images__container data-target="has-many-fields-for.container" | |
= ff.simple_fields_for :taggings do |ff| | |
= render 'category_tagging_form', f: ff | |
script type="text/html" data-target="has-many-fields-for.template" data-index-placeholder="new_tagging" | |
= ff.simple_fields_for :taggings, ff.object.taggings.build, child_index: 'new_tagging' do |ff| |
This file contains 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
/// === DESCRIPTION === | |
/// This is a naive implementation of a registry for Actix Actors that | |
/// implement a SyncContext. Using it you can retreive an address for | |
/// any actor registered with it from any point in your program. | |
/// | |
/// === LICENSE === | |
/// Copyright 2019 Stanko K.R. <[email protected]> | |
/// | |
/// Permission is hereby granted, free of charge, to any person | |
/// obtaining a copy of this software and associated documentation |
This file contains 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
gallery = Gallery.find(arguemnts[:gallery_id]) | |
arguments[:images].map do |file| | |
# Image has a Shrine uploader attached to `file_data` | |
Image.create(file: file, gallery: gallery) | |
end |
This file contains 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
{ | |
galleryID: "some_gallery_id", | |
images: [ | |
#<ActionDispatch::Http::UploadedFile:0x000055fb90c6dbd0 @tempfile=#<Tempfile:/tmp/RackMultipart20180131-31-6zkb3i.txt>, @original_filename="b.txt", @content_type="text/plain", @headers="Content-Disposition: form-data; name=\"0\"; filename=\"b.txt\"\r\nContent-Type: text/plain\r\n">, | |
#<ActionDispatch::Http::UploadedFile:0x000055fb90c6da18 @tempfile=#<Tempfile:/tmp/RackMultipart20180131-31-13i0pio.txt>, @original_filename="c.txt", @content_type="text/plain", @headers="Content-Disposition: form-data; name=\"1\"; filename=\"c.txt\"\r\nContent-Type: text/plain\r\n"> | |
] | |
} |
This file contains 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
mutation UploadGalleryImages { | |
uploadGalleryImages( | |
galleryID: "some_gallery_id" | |
images: [null, null] | |
) { | |
id | |
filename | |
url | |
} | |
} |
This file contains 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
user.avatar_data_uri = arguments[:input][:avatar][:data] | |
user.save |
This file contains 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
mutation SetAvatar($data: String, $filename: String) { | |
updateUser( | |
id: "some_user_uuid" | |
input: { | |
avatar: { | |
filename: $filename | |
data: $data | |
} | |
} | |
) { |
This file contains 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
mutation SetAvatar($url: String, $filename: String) { | |
updateUser( | |
id: "some_user_uuid" | |
input: { | |
avatar: { | |
filename: $filename | |
url: $url | |
} | |
} | |
) { |
NewerOlder