I’m not a good coder, so every time I need some new script for automation I just copy old code from the old script. It occurs to me that I should write my script in a more reusable way to avoid constantly copy and paste . This post will give a simple example for writing… Continue reading import you own function in python
Cyberark with RDCMan
RDCMan is a powerful tool that allow system administrator to mange multiple window server easily. This post will introduce how to integrate this tool with Cyberark’s PAM solution. 01. From top menu, select Edit>Add server or use short cut Ctrl+A 02. In the pop up windows, select Server settings. Enter PSM IP or FQDN in… Continue reading Cyberark with RDCMan
Factory reset Cisco switch
It’s simple to factory reset a Cisco switch. 01. Use a console cable to connect to the Cisco switch 02. Go to enable mode either with en or enable 03. Input write erase in the console and when prompted confirm(hit enter) 04. Input delete flash:vlan.dat and when prompted confirm(hit enter) 05. Reload the Cisco switch,… Continue reading Factory reset Cisco switch
Use cellular data as “wan” connection
Here is a simple diagram of the lab. PC1 has 2 connection, one with cell phone(wifi) and the other is a ethernet cable connect to PC2. PC2 only has 1 connection which connects to PC1. We want to let PC2 access to Internet through wifi connection of PC1. 01 Enable IP ForwardingWe have to edit… Continue reading Use cellular data as “wan” connection
Read data from csv with python3
It’s common that we need to process data in csv format. We will use the csv library to read csv file. Here is a sample code for read data from csv file and print each row.
Data Wrangling with sed
How to get clean data is important, however Excel or any GUI application might not be able to help us clean the raw data. Moreover, if the data set is large, the application might crush. If you are also using unix system like I did, there are many useful utilities that could help with data… Continue reading Data Wrangling with sed
List all csv file in current directory
I need to list all csv file in a directory and I have to goole how to do it every time I need it. So I’ll write a post to remind myself. Since I only want to list file in current directory not any sub directory. I have to use the maxdepth flag, as find… Continue reading List all csv file in current directory
homebrew install ChromeDriver not working in M1 Mac
I was trying selenium and I have installed chromedriver using home-brew. However, I could not execute the driver(block by Apple). Here is how to solve the issue. I’m using a Mac with M1 chip thought that should be irrelevant. The error should look something like this. The solution is simple, just type the command below.… Continue reading homebrew install ChromeDriver not working in M1 Mac
Factory rest HPE 5510 switch
1. Reload the switch 2. Hit “Ctrl+B” as the switch boot up to enter extended boot menu 3. From the menu select 5(Restore to factory default configuration) 4. If “Password recovery capability is enabled”. you could not perform a factory reset. You will have to disable the function first. 5. Reload the switch and enter… Continue reading Factory rest HPE 5510 switch
[Cyberark] Enable CPM debug for trouble shooting
Sometimes basic log info did not help solve CPM issue, we can see more detail logs if debug mode is enabled. There are 2 method that you can enable CPM debug log. Method 1 : enable CPM debug on Platform levelAll accounts in this platform will enable debug logging. Method 2 : enable CPM debug… Continue reading [Cyberark] Enable CPM debug for trouble shooting