Install the OpenSSL on Debian based systems
sudo apt-get install openssl| # list buckets starting with 'codebuild' | |
| buckets=($(aws s3api list-buckets --query 'Buckets[?starts_with(Name, `codepipeline-`) == `true`].Name' --output text)) | |
| # delete them | |
| for b in ${buckets[@]} | |
| do | |
| aws s3 rb --force s3://${b} | |
| done |
| public void uploadImage(Bitmap bitmap) { | |
| ByteArrayOutputStream baos = new ByteArrayOutputStream(); | |
| bitmap.compress(Bitmap.CompressFormat.JPEG, 100, baos); | |
| byte[] data = baos.toByteArray(); | |
| FirebaseStorage storage = FirebaseStorage.getInstance(); | |
| StorageReference storageRef = storage.getReferenceFromUrl("gs://you_firebase_app.appspot.com"); | |
| StorageReference imagesRef = storageRef.child("images/name_of_your_image.jpg"); | |
| UploadTask uploadTask = imagesRef.putBytes(data); |
| git fetch --all | |
| git reset --hard origin/master | |
| git pull origin master |