Posts

Ubuntu Linux Boot Repair

Image
Boot-Repair Warning:  This software is able to share information about your device for diagnostic purposes. You can chose to opt out. Please read this page fully. The log is quite helpful especially for the novice users. Boot-Repair  is a simple tool to repair frequent boot issues you may encounter in Ubuntu like when you can't boot Ubuntu after installing Windows or another Linux distribution, or when you can't boot Windows after installing Ubuntu, or when GRUB is not displayed anymore, some upgrade breaks GRUB, etc. Boot-Repair lets you fix these issues with a simple click, which (generally reinstalls GRUB and) restores access to the operating systems you had installed before the issue. Boot-Repair also has advanced options to back up table partitions, back up bootsectors, create a  Boot-Info  (to get help by email or forum), or change the default repair parameters: configure GRUB, add kernel options (acpi=off ...), purge GRUB, change the default OS, restore a Wind...

LiteSun Digital Timer Manual

Image
https://www.amazon.com/FosPower-Electrical-Outlets-Programmable-Capacity/dp/B07958YD8R/ref=asc_df_B07958YD8R/?tag=hyprod-20&linkCode=df0&hvadid=692875362841&hvpos=&hvnetw=g&hvrand=14083707952334820094&hvpone=&hvptwo=&hvqmt=&hvdev=c&hvdvcmdl=&hvlocint=&hvlocphy=9026289&hvtargid=pla-2281435177898&mcid=916b8c9e65b539f5aa0e7cda5d70922b&hvocijid=14083707952334820094-B07958YD8R-&hvexpln=73&th=1 Set up:      Clock Mode:               Hold SET for 2 seconds till                - On the Lower Left in the screen frame SET starts flashing.                -  On the Top of the the Day - MO, TU, WE, TH, FR, SA, SU starts flashing.  Set the Current Day by pressing buttons : [PROG/+] for moving forward, [-] for moving backward.               - ...

Digital Advertising

Promote Business through Google Ads.  Options: A. Create a Google Business Profile, and forward customers to the business profile, provided by Google. B. Forward customers to Hosted Domain website  - Specific Webpages, for up-to-date contents, and offers, available within the website. 

Insecure Coding Examples

 Below are examples of insecure code practices that expose applications to vulnerabilities. Each example highlights the issue and its consequences. 1. SQL Injection Issue : Dynamic queries with unsanitized user input allow attackers to manipulate SQL statements. Insecure Example (Python) : import sqlite3 def get_user(username): conn = sqlite3.connect("example.db") cursor = conn.cursor() query = f"SELECT * FROM users WHERE username = '{username}'" # Bad practice! cursor.execute(query) return cursor.fetchone() user_input = "'; DROP TABLE users; --" # Malicious input print(get_user(user_input)) Why insecure : The input is directly concatenated into the SQL query, allowing SQL injection (e.g., deleting tables or accessing unauthorized data). 2. Hardcoded Credentials Issue : Hardcoding secrets like passwords exposes them if the code is leaked. Insecure Example (Java) : public class DatabaseConfig { public st...

Secure Coding Examples

 Secure coding refers to the practice of writing software in a way that minimizes security vulnerabilities. Below are examples of secure coding practices in different contexts. 1. Input Validation Issue : Unvalidated input can lead to injection attacks (SQL injection, Cross-Site Scripting). Solution : Always validate and sanitize user inputs. Example: SQL Injection Prevention (Python with SQLAlchemy) from sqlalchemy import create_engine, text # Database connection engine = create_engine('sqlite:///example.db') # Unsafe query (never do this!) # user_input = "'; DROP TABLE users; --" # Secure query using parameterized queries def get_user(username): query = text("SELECT * FROM users WHERE username = :username") with engine.connect() as connection: result = connection.execute(query, {"username": username}) return result.fetchone() username = "john_doe" print(get_user(username)) Why secure : Parameteri...

Creating coloring pages from photo

Creating coloring pages from photo images is a fun and creative project! On Ubuntu Linux, you can use several tools and software to achieve this. Here’s a step-by-step guide: --- 1. Using GIMP GIMP (GNU Image Manipulation Program) is a powerful and free tool for editing images. Steps: 1. Install GIMP: sudo apt update sudo apt install gimp 2. Open Your Photo in GIMP: Launch GIMP and open the photo you want to convert. 3. Convert to Grayscale: Go to Image > Mode > Grayscale. 4. Adjust Brightness and Contrast: Go to Colors > Brightness-Contrast to adjust the image for a better outline. 5. Apply Edge Detection: Go to Filters > Edge-Detect > Difference of Gaussians. Adjust the parameters to highlight the edges. 6. Optional: Invert Colors: Go to Colors > Invert if you want black outlines on a white background. 7. Save Your Coloring Page: Export the file as a PDF or PNG for printing. --- 2. Using Inkscape Inkscape is another powerful tool, especially for vector graphics, and...

Create Coloring pages: Invert Images and Desaturate Color

Yes, you can both use Debian-based tools and code a solution in Python to invert images and convert them into coloring pages. Here's a guide for both approaches:  1. Using Debian-based Tools #### A. ImageMagick **ImageMagick** is a powerful, open-source image manipulation tool that is available on Debian-based systems (like Ubuntu). You can use it to invert colors and process images. **Install ImageMagick:** ```bash sudo apt update sudo apt install imagemagick ``` **Convert Image to Inverted Colors:** ```bash convert input.jpg -negate inverted.jpg ``` **Convert Inverted Image to Grayscale (Coloring Page Effect):** ```bash convert inverted.jpg -colorspace Gray coloring_page.jpg ``` These commands will invert the colors and convert the image to grayscale to give a coloring page effect. You can adjust various parameters to fine-tune the result. ### 2. Using Python (PIL and OpenCV) If you prefer coding in Python, you can use libraries like **PIL (Pillow)** and **OpenCV** to perform the...