Skip to content

Instantly share code, notes, and snippets.

View nguni52's full-sized avatar

Nguni nguni52

View GitHub Profile
@Hakky54
Hakky54 / openssl_commands.md
Last active July 18, 2024 03:47 — forked from p3t3r67x0/openssl_commands.md
Some list of openssl commands for check and verify your keys

OpenSSL 🔐

Install

Install the OpenSSL on Debian based systems

sudo apt-get install openssl
@pahud
pahud / list-s3-buckets.sh
Created August 18, 2019 04:39
list s3 bucket names starting with a prefix
# 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
@nglauber
nglauber / upload_firebase.java
Last active June 15, 2019 18:34
Upload image using firebase
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);
@vladimirtsyupko
vladimirtsyupko / gist:10964772
Created April 17, 2014 08:32
Git force pull to overwrite local files
git fetch --all
git reset --hard origin/master
git pull origin master