Skip to content

Instantly share code, notes, and snippets.

View dPacc's full-sized avatar
:octocat:
超本能

Deepak dPacc

:octocat:
超本能
  • Abu Dhabi
  • 14:58 (UTC +04:00)
View GitHub Profile

Setting Up Chromium and ChromeDriver for Browser Automation on Ubuntu

This guide explains how to properly set up Chromium and ChromeDriver on Ubuntu servers for browser automation tasks using tools like Selenium WebDriver.

The Problem with Ubuntu's Default Chromium Package

On Ubuntu (especially 20.04 and newer), the chromium-browser package in the default repositories is actually just a transitional package that redirects to the Snap version. This Snap-packaged version of Chromium runs in a confined environment with restricted filesystem access, which often causes permission issues when used with browser automation tools.

Common errors you might encounter with the Snap version include:

  • cannot create default profile directory
@dPacc
dPacc / private_docker_registry.md
Created January 23, 2025 05:07
Self Host Private Docker Registry
@dPacc
dPacc / jenkins_backup_restore.md
Created January 22, 2025 05:04
Jenkins Backup and Restoration Guide

Jenkins Backup and Restoration Guide

This guide provides detailed instructions for backing up and restoring Jenkins configurations, jobs, and credentials when running Jenkins via WAR file.

Current Setup

System Information

  • Jenkins running from WAR file
  • Jenkins home directory: /data/jenkins
  • WAR file: jenkins_2.452.1.war
@dPacc
dPacc / nexus_bkp_rst.md
Created January 17, 2025 04:42
Nexus Repository Backup and Restore

Sonatype Nexus Backup and Restore Guide

This guide provides detailed instructions for backing up and restoring Sonatype Nexus data when running in a Docker container. It includes automated backup scripts and step-by-step restoration procedures.

Prerequisites

  • Docker installed and running
  • Sonatype Nexus running in a Docker container
  • Root or sudo access to the host system
  • Basic understanding of bash scripting and cron jobs
@dPacc
dPacc / log_trace_metrics.md
Created May 3, 2024 09:59
Logging vs Tracing vs Metrics

Logging vs Tracing vs Metrics

log_trace_metrics

Logging, Tracing, Metrics

Logging, tracing, and metrics are 3 pillars of system observability.

Logging

Logging records discrete events in the system. For example, we can record an incoming request or a visit to databases as events. It has the highest volume. ELK (Elastic-Logstash-Kibana) stack is often used to build a log analysis platform. We often define a standardized logging format for different teams to implement, so that we can leverage keywords when searching among massive amounts of logs.

@dPacc
dPacc / ec2-storage-extend.md
Created December 18, 2023 08:24
Extending AWS EC2 Instance Storage

Extending AWS EC2 Instance Storage

This guide explains how to extend the storage of an AWS EC2 instance's root partition and resize the filesystem to utilize the additional space.

Prerequisites

  • An AWS EC2 instance with an EBS volume.
  • SSH access to the EC2 instance.

Steps

@dPacc
dPacc / rn-env-setup.md
Created October 8, 2023 15:24
React Native Env Vars Setup

The best way to handle environment variables in React Native is to use the react-native-config library.

Here are the steps:

  1. Install the library

npm install react-native-config

Or if you use Yarn:

@dPacc
dPacc / folder-names-to-csv.md
Last active October 4, 2023 05:07
Command folder names to csv

You can run this command in a shell from the directory that you want to get the names of the folder into a csv.

find . -maxdepth 1 -type d -name "MA*" | sed 's|./||' > folder-names.csv

What this does is it looks for any directories ('-type d') within your current location ('.') that start with 'MA' ('-name "MA"')*. The '-maxdepth 1' part just means we're only looking at the top level, and not diving down into subdirectories.

Once those directories are found, we strip out the './' at the beginning of each folder name using 'sed', and then we put all of these names into a file called 'folder-names.csv'

@dPacc
dPacc / ec2-automation.md
Last active September 16, 2023 19:57 — forked from ashiwanikumar/server-update-report.md
EC2 Security Automation

Creating a File:

  1. Create a new file under /etc/cron.daily/ named "autoupdate"

    root@dashboard:/home/linuxadmin# vim /etc/cron.daily/autoupdate

  2. Paste the following script into the file:

OS Update with Dist-upgrade