Skip to main content

Posts

Python Script to list all open Pull requests from AWS CodeCommit repositories

The following Python script will help to export list of any open pull requests from CodeCommit repositories from an AWS account. The output will be saved within CSV file. #!/usr/bin/env python3.8 # This script is used to find out any open pull requests from all the repositories # from an account and write output to the csv file # Importing boto3, csv and time module import boto3 import csv import time # Setting up AWS profile and region profile = "default" region = "us-east-1" session = boto3 . Session ( profile_name = profile , region_name = region ) repo_client = session . client ( 'codecommit' ) repos = repo_client .list_repositories(     sortBy = 'repositoryName' ) repo_list = repos repo_name = repo_list [ 'repositories' ] # Getting current date and time date_time = time . strftime ( " %d %m%Y_%H%M%S" ) # Setting up file name fname = "Open_PullReqsIDs_" ftime = date_time fext = ".csv" filename

Error: curl: (1) Protocol"https" not supported or disabled in libcurl

While trying to run a CURL command in the Windows command prompt following error message occurs: Error: curl: (1) Protocol"https" not supported or disabled in libcurl For some reason, Windows doesn't like single quotes with the URL. To resolve this, please use the double quotes with the URL. For e.g. curl -J "http://localhost:8080"   Hope you find it useful.   Disclaimer: www.TechieTalks.co.uk does not conceal the possibility of error and shortcomings due to human or technical factors. www.TechieTalks.co.uk does not bear responsibility upon any loss or damage arising from conduct or activities related to the use of data and information contained in this blog.

Fixed: Error 0x80070718: Not enough quota is available to process this command

Recently, I had come across following error message when one of the users was trying to copy files to Network folder. His folder was setup with offline files option so that files are available to user when network connection to server is either poor or not available. Error 0x80070718: Not enough quota is available to process this command After doing it bit of a search, I found a following solution to above error message. This is caused by Offline files. I have followed these steps on Windows 7 Pro 64 bit PC.           Open Control Panel           Go to Sync centre           Select Manage offline Files from left side column           An Offline files box will appear, click on Disk Usage tab           Click on Change limits button, change limit to required space.           Click on OK button twice. Hope you find it useful. Disclaimer: www.TechieTalks.co.uk does not conceal the possibility of error and shortcomings due to human or technical factors. www.Tech

RHEL 7: NDO2DB service is not running

I have Nagios Xi 4.3.2 installed on Red Hat Enterprise Linux 7.3 (Mapio) . Recently, I had an issue with my Nagios monitoring tool. It stopped monitoring my devices. When I checked further, I found out that NDO2DB service stopped working. Because of that, I could not see most recent status of any of the devices monitored by Nagios. I logged on to Read hat box and tried below command to check the status of the service: #systemctl status ndo2db You can also use following command to check any service status #Service ndo2db status I tried following commands to start/restart ndo2db service. #systemctl start ndo2db OR #systemctl restart ndo2db After applying above commands, I ran following command again to check status but it failed to start #systemctl status ndo2db After doing bit of searching on this issue, I found the solution. I entered following commands to start NDO2DB service. #service nagios stop #service ndo2db stop #rm -f /usr/

How to move Pagefile.sys to another drive?

Recently, I had to move Pagefile.sys from C: drive to another drive on a server to free up some space. Page file is used as a virtual memory in Windows. Generally, you can find on C:\Pagefile.sys . It is a hidden file and you won’t be able to see it until you changes settings in Windows Explorer not to hide protected operating system files. To move the Pagefile to a new drive, follow these steps. You can perform these steps on any Windows Vista, or Windows 7 on wards or Windows server 2003 on wards.   Go to Control Panel and then System and Security . Now, click on Advanced system settings on the left side column. System properties box will appear, click on Advanced tab. Under Performance , click on Settings … button Performance Options box will appear, click on Advance tab. In Virtual Memory section, click on Change… button Virtual Memory box will appear. In this box, untick Automatically manage paging file size for all drives Select the drive letter C:

Windows 10: “Run as a different user” option is missing

Hi All, you may have already noticed that when you right click on any application on Windows 10 PC, you can see “Run as Administrator” option. But “Run as different user” option is missing. To get this option, you’ll make a make a change in registry.   Note :  Please backup registry and make a system restore point before making changes to Registry. Click on  Start . Type  Regedit  and press  Enter  key. In Registry Editor, navigate to HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\Explorer        If you do not find this key, right click on Windows key and select new key. Rename it to Explorer . Now, in the right side pane, right click and add DWORD value ShowRunasDifferentuserinStart Right click on ShowRunasDifferentuserinStart and click on Modify… Change its value to 1 and click on OK . Close Registry Editor and reboot PC. Once you restart your PC, you can find Run as different user option is available when you right click on any application. Hope you f

PowerShell Script: Update AD attributes using CSV

Hi All, in this post I am going to share information on how can you update an attribute(s) in AD for multiple objects. In this post, I am using a CSV file that contains users’ First Name, Last Name, their login name and Employee ID. I wanted to update Employee ID for all the users listed in CSV file. To achieve this, I have complied a PowerShell script that uses CSV file and update AD attributes for multiple users. CSV file: I saved CSV file in C:\ADTest.CSV . I ran following PowerShell script as admin. This script import CSV data, updates EmployeeID data for each login name (sAMAccountName) listed in CSV file. #Import Active Directory module Import-Module ActiveDirectory #Import CSV file $Obj = Import-Csv "C:\ADTest.csv" foreach ( $Usr in $Obj ) { Get-ADUser -Filter "sAMAccountName -eq ' $( $u . sAMAccountName) '" -properties * | set-aduser -replace @{employeeID = " $( $u . employeeID) " } -