Skip to content

Instantly share code, notes, and snippets.

View alshell7's full-sized avatar

Owais alshell7

View GitHub Profile
@alshell7
alshell7 / MainMod.py
Last active December 10, 2023 14:48
Convert given string to SHA1 hash by hexadecimal digest in python
def sha1Hash(toHash):
try:
messageDigest = hashlib.sha1()
stringM = str(toHash)
byteM = bytes(stringM, encoding='utf')
messageDigest.update(byteM)
return messageDigest.hexdigest()
except TypeError:
raise "String to hash was not compatible"
@alshell7
alshell7 / Vagrantfile_Multi_Agent
Last active May 10, 2021 08:49
Array of hashes with settings for each virtual machine in Vagrant
# PS D:\vagrant_test> cat .\Vagrantfile
# Prefix for LAN
BRIDGE_NET="192.168.1."
# Prefix for Internal LAN
INTERNAL_NET="192.168.15."
# The domain that we will use for the entire site
DOMAIN="sample.com"
# An array of hashes with settings for each virtual machine
servers=[
{

Keybase proof

I hereby claim:

  • I am alshell7 on github.
  • I am alshell7 (https://keybase.io/alshell7) on keybase.
  • I have a public key ASDmUhbnQRmvZHmS1p70w_PI54g-D7RItT1qPUrFZ31YTgo

To claim this, I am signing this object:

@alshell7
alshell7 / steps.md
Created January 28, 2021 17:59
Backup Redis from Redis Docker Container

docker exec -it redis_server bash redis_server is name of docker container

chown redis:redis -R /etc making sure if the redis server has permissions to write

redis-cli > save enter the cli and save

cp /etc/crontab /tmp/backup.rdb copy from default location of redis docker dump to tmp

docker cp f47052fdc525:/tmp/backup.rdb /tmp/backup.rdb f47052fdc525 is the container id

@alshell7
alshell7 / steps.md
Created January 18, 2021 09:07
Installing Cockpit for Ubuntu 16.04 AMI

Installing Cockpit on EC2 instance

AMI: ami-003ba08113592046f

sudo apt update

Install the package sudo apt install cockpit

Start the service sudo systemctl start cockpit

@alshell7
alshell7 / installing-rasa.md
Last active October 6, 2020 10:33
Superfast & clean install Rasa and Rasa X on fresh Ubuntu 16.04

Installing Docker and Docker Compose

wget -O - https://gist.githubusercontent.com/wdullaer/f1af16bd7e970389bad3/raw/install.sh | bash

Installing Rasa X

curl -s get-rasa-x.rasa.com | sudo bash

Installing Rasa and setting up the bot

mkdir -m 777 newbot

cd newbot

@alshell7
alshell7 / notes.sh
Created June 1, 2020 12:37
Installing Gotty on Ubuntu 16.04 - Share your terminal as a web application
wget https://github.com/yudai/gotty/releases/download/v1.0.1/gotty_linux_amd64.tar.gz
tar xvf gotty_linux_amd64.tar.gz
chmod +x gotty
sudo mv gotty /usr/local/bin/
gotty -version
@alshell7
alshell7 / install-rabbitmq-ubuntu1604.md
Last active August 1, 2019 13:21 — forked from fernandoaleman/install-rabbitmq-ubuntu1604.md
Install RabbitMQ on Ubuntu 16.06

Install RabbitMQ on Ubuntu 16.04

Add RabbitMQ apt repository

echo 'deb http://www.rabbitmq.com/debian/ testing main' | sudo tee /etc/apt/sources.list.d/rabbitmq.list
wget -O- https://www.rabbitmq.com/rabbitmq-release-signing-key.asc | sudo apt-key add -
@alshell7
alshell7 / nnlm-tensor.ipynb
Created April 5, 2019 07:17
NNLM-Tensor.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@alshell7
alshell7 / speedup.md
Last active October 17, 2018 07:06
Boost your Android Studio performance and speed up Gradle build time ⚡⚡⚡

Modify the following files and settings

File : gradle.properties

  org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m 
  org.gradle.daemon=true
  org.gradle.parallel=true
  org.gradle.configureondemand=false #Since Gradle 4.2, this is to be disabled, else can use it.