dartokloning / .bashrc with synth-shell
0 likes
0 forks
1 files
Last active
Indonesian date time, synth-shell, custom LS_COLORS with vivid
| 1 | # ~/.bashrc: executed by bash(1) for non-login shells. |
| 2 | # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) |
| 3 | # for examples |
| 4 | |
| 5 | # If not running interactively, don't do anything |
| 6 | case $- in |
| 7 | *i*) ;; |
| 8 | *) return;; |
| 9 | esac |
dartokloning / Synth-Shell
0 likes
0 forks
1 files
Last active
Customization of synth-shell for personal use
| 1 | #!/usr/bin/env bash |
| 2 | |
| 3 | ## |
| 4 | ## |
| 5 | ## Visit for instructions and more information: |
| 6 | ## https://github.com/andresgongora/synth-shell/ |
| 7 | ## |
| 8 | ## |
| 9 | |
| 10 | ## |
dartokloning / ParrotOS Prompt
0 likes
0 forks
1 files
Last active
| 1 | if [ "$color_prompt" = yes ]; then |
| 2 | PS1="\[\033[0;31m\]\342\224\214\342\224\200\$([[ \$? != 0 ]] && echo \"[\[\033[0;31m\]\342\234\227\[\033[0;37m\]]\342\224\200\")[$(if [[ ${EUID} == 0 ]]; then echo '\[\033[01;31m\]root\[\033[01;33m\]@\[\033[01;96m\]\h'; else echo '\[\033[0;39m\]\u\[\033[01;33m\]@\[\033[01;96m\]\h'; fi)\[\033[0;31m\]]\342\224\200[\[\033[0;32m\]\$PWD\[\033[0;31m\]]\n\[\033[0;31m\]\342\224\224\342\224\200\342\224\200\342\225\274 \[\033[0m\]\[\e[01;33m\]\\$\[\e[0m\] " |
| 3 | #PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' |
| 4 | else |
| 5 | PS1="\[\033[0;31m\]\342\224\214\342\224\200\$([[ \$? != 0 ]] && echo \"[\[\033[0;31m\]\342\234\227\[\033[0;37m\]]\342\224\200\")[$(if [[ ${EUID} == 0 ]]; then echo '\[\033[01;31m\]root\[\033[01;33m\]@\[\033[01;96m\]\h'; else echo '\[\033[0;39m\]\u\[\033[01;33m\]@\[\033[01;96m\]\h'; fi)\[\033[0;31m\]]\342\224\200[\[\033[0;32m\]\$PWD\[\033[0;31m\]]\n\[\033[0;31m\]\342\224\224\342\224\200\342\224\200\342\225\274 \[\033[0m\]\[\e[01;33m\]\\$\[\e[0m\] " |
| 6 | #PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' |
| 7 | fi |
| 8 | unset color_prompt force_color_prompt |
| 9 | |
| 10 | # If this is an xterm set the title to user@host:dir |
dartokloning / sqlite3crudwithdialog.sh
0 likes
0 forks
1 files
Last active
| 1 | #!/bin/bash |
| 2 | |
| 3 | DB_FILE="/path/to/your/database.sqlite3" |
| 4 | |
| 5 | # Function to initialize the database |
| 6 | function initialize_db() { |
| 7 | sqlite3 "$DB_FILE" "CREATE TABLE IF NOT EXISTS users ( |
| 8 | id INTEGER PRIMARY KEY AUTOINCREMENT, |
| 9 | username TEXT NOT NULL UNIQUE, |
| 10 | password TEXT NOT NULL, |
dartokloning / EmailValidation.sh
0 likes
0 forks
1 files
Last active
| 1 | #!/bin/bash |
| 2 | |
| 3 | #Email Format Validation: |
| 4 | #- Uses a regular expression to check if the email address format is valid. |
| 5 | |
| 6 | #Domain Existence Check: |
| 7 | #- Uses the dig command to look up the domain's DNS records. |
| 8 | #- Ensures the domain has a valid DNS record. |
| 9 | |
| 10 | #Input and Validation: |
dartokloning / DomainNameValidation.sh
0 likes
0 forks
1 files
Last active
| 1 | #!/bin/bash |
| 2 | |
| 3 | #Validation Function: |
| 4 | #- Uses a regular expression to check if the domain name format is valid. |
| 5 | |
| 6 | #Domain Pointing Check: |
| 7 | #- Uses the dig command to resolve the domain to an IP address. |
| 8 | #- Checks if the resolved IP address matches the server's IP address. |
| 9 | |
| 10 | #Input and Validation: |
dartokloning / PasswordValidation.sh
0 likes
0 forks
1 files
Last active
| 1 | #!/bin/bash |
| 2 | |
| 3 | #Validation Function: |
| 4 | #- Checks if the password is not empty. |
| 5 | #- Ensures the password length is between 5 and 16 characters. |
| 6 | #- Ensures the password is not the same as the username. |
| 7 | #- Checks if the password contains no spaces. |
| 8 | #- Ensures the password contains at least one uppercase letter. |
| 9 | #- Ensures the password contains at least one number. |
| 10 | #- Ensures the password contains at least one special character. |
dartokloning / UsernameValidation.sh
0 likes
0 forks
1 files
Last active
| 1 | #!/bin/bash |
| 2 | |
| 3 | #Validation Function: |
| 4 | #- Checks if the username is not empty and has at least 5 characters. |
| 5 | #- Checks if the username contains only letters and numbers with no spaces. |
| 6 | #- Checks if the username already exists on the system. |
| 7 | |
| 8 | #Input and Validation: |
| 9 | #- Prompts the user to enter a username. |
| 10 | #- Calls the validation function to check the entered username. |
dartokloning / functions.php
0 likes
0 forks
1 files
Last active
| 1 | /** |
| 2 | *Open Visit Site in new tab |
| 3 | */ |
| 4 | function visit_site_admin_bar_on_new_tab( $wp_admin_bar ) { |
| 5 | if ( ! current_user_can( 'manage_options' ) ) { |
| 6 | return; |
| 7 | } |
| 8 | $wp_admin_bar -> add_node([ |
| 9 | 'parent' => 'site-name', |
| 10 | 'id' => 'view-site', |
dartokloning / functions.php
0 likes
0 forks
1 files
Last active
| 1 | /** |
| 2 | *Open Visit Site in new tab |
| 3 | */ |
| 4 | function visit_site_admin_bar_on_new_tab( $wp_admin_bar ) { |
| 5 | if ( ! current_user_can( 'manage_options' ) ) { |
| 6 | return; |
| 7 | } |
| 8 | $wp_admin_bar -> add_node([ |
| 9 | 'parent' => 'site-name', |
| 10 | 'id' => 'view-site', |
Newer
Older