Skip to content

Instantly share code, notes, and snippets.

View jibinpb's full-sized avatar

Jibin jibinpb

  • London, United Kingdom
View GitHub Profile
@jibinpb
jibinpb / geth_rhel_installation.sh
Last active March 14, 2018 02:52
Download and unzip GETH Binaries
# Get the latest GETH package url from https://geth.ethereum.org/downloads/
wget "https://gethstore.blob.core.windows.net/builds/geth-linux-amd64-1.8.1-1e67410e.tar.gz"
# Unzip the file(file name need to change if the package is different)
tar -xvzf geth-linux-amd64-1.8.1-1e67410e.tar.gz
# Rename the folder and change working directory to that
mv geth-linux-amd64-1.8.1-1e67410e geth-linux
cd geth-linux/
@jibinpb
jibinpb / create_gmsa_windows_servers.ps1
Last active September 30, 2019 23:15
Create gMSA for Windows Servers
Import-module activedirectory
$gMSAName = 'gMSA_Account_Name' ## Replace this value with new gMSA Name
$serverList = 'Server001','Server002','Server003','Server004','Server005' ## Replace with Server Names
$adOU = 'ou=Managed Service Accounts,OU=Service Accounts,DC=your_company,DC=com' ## Replace with actual AD OU
## Checking whether organizational unit exists, if not create it.
$ous = dsquery ou "$adOU"
if ($ous.count -eq 0) {
dsadd ou "$adOU"
@jibinpb
jibinpb / get_trusted_sites.ps1
Created June 5, 2018 01:22
Get Trusted Sites list from Internet Options
<##
0 = My Computer
1 = Local Intranet Zone
2 = Trusted sites Zone
3 = Internet Zone
4 = Restricted Sites Zone
##>
Get-ItemProperty "Registry::HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMapKey"
@jibinpb
jibinpb / CentOS Root ReamMe
Created June 17, 2018 11:47
CentOS Root ReamMe
cat /root/README
@jibinpb
jibinpb / extract_date.py
Last active July 7, 2018 06:45
Extract Date from Text
from dateutil.parser import parse
from dateutil.tz import gettz
from datetime import datetime
tzinfos = {"IST": gettz("Asia/Kolkata")}
for obj in (parse("Last Updated : Jan 23, 2018 12:13 PM IST | Source: Moneycontrol.com", fuzzy_with_tokens=True, tzinfos=tzinfos)):
if(isinstance(obj, datetime)):
print(obj)
@jibinpb
jibinpb / install_RSAT-AD-PowerShell.ps1
Created July 5, 2018 04:00
Install AD PowerShell module (Remote Server Administration Tools)
Install-WindowsFeature RSAT-AD-PowerShell
@jibinpb
jibinpb / install_gmsa_windows_servers.ps1
Last active July 5, 2018 05:55
Create gMSA in Windows Servers
Import-module activedirectory
$gMSAName = 'gMSA_Account_Name' ## Replace this value with new gMSA Name
## Install the gMSA account in server
Install-ADServiceAccount -Identity $gMSAName
## Test gMSA account installation in Server
Test-AdServiceAccount $gMSAName
@jibinpb
jibinpb / orientdb_download_start.sh
Created July 10, 2018 16:11
Download and Start OrientDb in Centod
cd /tmp/
wget https://s3.us-east-2.amazonaws.com/orientdb3/releases/3.0.3/orientdb-tp3-3.0.3.tar.gz
tar zxvf orientdb-tp3-3.0.3.tar.gz -C /opt/
cd /opt/orientdb-tp3-3.0.3/
sudo bin/server.sh
@jibinpb
jibinpb / orientdb_download_start.sh
Created July 10, 2018 16:11
Download and Start OrientDb in CentOS
cd /tmp/
wget https://s3.us-east-2.amazonaws.com/orientdb3/releases/3.0.3/orientdb-tp3-3.0.3.tar.gz
tar zxvf orientdb-tp3-3.0.3.tar.gz -C /opt/
cd /opt/orientdb-tp3-3.0.3/
sudo bin/server.sh
@jibinpb
jibinpb / install_cassandra_centos.sh
Created July 15, 2018 08:41
Install Cassandra in CentOS
## Run as root
sudo su -
## Create file for Cassandra Repo
cat <<EOF >> /etc/yum.repos.d/cassandra.repo
[cassandra]
name=Apache Cassandra
baseurl=https://www.apache.org/dist/cassandra/redhat/311x/
gpgcheck=1
repo_gpgcheck=1