Skip to content

Instantly share code, notes, and snippets.

@s1rc0
s1rc0 / remove-ambari-and-hadoop.sh
Created July 5, 2018 07:34 — forked from hourback/remove-ambari-and-hadoop.sh
I'm using this to clean up between installations of Ambari and HDP.
#!/bin/bash
ambari-server stop
ambari-server reset
ambari-agent stop
service mysqld stop
service postgresql stop
python /usr/lib/python2.6/site-packages/ambari_agent/HostCleanup.py
@s1rc0
s1rc0 / Makefile
Created June 28, 2018 17:11 — forked from ryu1kn/Makefile
Encrypt/decrypt with AWS KMS using AWS cli
# How to encrypt/decrypt your text/blob secret with AWS KMS with AWS cli
KEY_ID=alias/my-key
SECRET_BLOB_PATH=fileb://my-secret-blob
SECRET_TEXT="my secret text"
ENCRYPTED_SECRET_AS_BLOB=encrypted_secret_blob
DECRYPTED_SECRET_AS_BLOB=decrypted_secret_blob # Result of decrypt-blob target
encrypt-text:
cat async.py
import time, logging, os, asyncio, aiohttp
from azure.storage.blob import ContentSettings
from azure.storage.blob import BlockBlobService
block_blob_service = BlockBlobService(account_name='',
account_key='')
class Uploader:
def __init__(self, links, concurrency=2, verbose=True):
self.links = links
self.queue = asyncio.Queue()
@s1rc0
s1rc0 / Install Spotify stable (v 0.9.17) on Fedora 23 64-bit
Created September 16, 2016 11:40 — forked from olejon/Install Spotify 0.9 on Fedora 64-bit
Install Spotify stable (v 0.9.17) on Fedora 23 64-bit
# START GUIDE
# Make sure you copy the whole lines into Terminal. Each command is on one line.
# Open Terminal and become root
sudo -s
# Update system
dnf upgrade