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
=begin | |
Using gem aws-sdk for a ror application for uploading images to s3 | |
Uploading images to a fixed bucket with different folders for each object or application. | |
The s3 keeps a limitation on the number of buckets creattion whereas there is no | |
limitation for content inside a bucket. | |
This code will upload image for a user to s3 using aws-sdk gem. The bucket and the image uploaded are made public | |
so that the images uploaded are directly accessible. The input it takes is the image complete path | |
where it is present, folder in which it should be uploaded and user_id for whom it should | |
be uploaded. |
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
/* | |
Hoje iremos MUDAR a vida da pessoa que não te responde no whatsappp... | |
Que tal enviar mensagens pra ela até obter uma resposta?! | |
Sensacional não acha?! Mas, somos devs, correto?! Então vamos automatizar esse paranauê! | |
Para utilizar: | |
- Abra o web.whatsapp.com; | |
- Selecione a conversa que você quer; | |
- Abra o console e cole o código que está no gist; |
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
item_id = "131131" | |
initial_coda = "000101" | |
name = "panthene" | |
store_id = 6 | |
tag_quantity = 15 | |
def zpl_generator(item_id, initial_coda, name, store_id, tag_quantity) | |
puts "^XA\n^CI28\n^LT44\n^LS-8\n^RS8,b0,,1,p,,,2\n\n\n^RFW,^FT8,0 H^FD5A61697474#{item_id}#{initial_coda}^SFdddddddddddddddddddddddd,1^FS\n^FT8,44^A0N,20,20^FH\^FD5A61697474#{item_id}#{initial_coda}^SFdddddddddddddddddddddddd,1^FS\n^FT8,108^A0N,40,40^FH\^FD#{name}^FS\n^FT500,125^BQ,2,4^FDzaitt.com.br?#{store_id}/#{item_id}^FS\n^FT40,656^BQ,2,4^FDzaitt.com.br?#{store_id}/#{item_id}^FS\n\n^FWI,\n^FT 630,536^A0,40,40^FH\^FD#{name}^FS\n^FT630,600^A0,20,20^FH\^FD5A61697474#{item_id}#{initial_coda}^SFdddddddddddddddddddddddd,1^FS\n\n\n\n^PQ#{tag_quantity}\n^XZ" | |
end |