Skip to content

Instantly share code, notes, and snippets.

View puppe1990's full-sized avatar
🚝
Always On Rails!

Matheus Nunes Puppe puppe1990

🚝
Always On Rails!
View GitHub Profile
@puppe1990
puppe1990 / upload-images-s3-sdk-ruby.rb
Last active June 7, 2020 13:39 — forked from Bijendra/upload-images-s3-sdk-ruby
Upload images to AWS S3 in rails application using aws-sdk
=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.
@puppe1990
puppe1990 / comoSerChatoNoWhatsapp.js
Created June 14, 2019 20:43 — forked from callmeloureiro/comoSerChatoNoWhatsapp.js
Como fazer alguém te responder no whatsapp
/*
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;
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