This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| grep -o "[0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+" auth.log | sort | uniq -c | sort -n |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| rsync -av -f"+ */" -f"- *" "$source" "$target" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| if [ "$#" -lt 4 ]; then | |
| echo "`basename $0` <mysql-root-passwd> <db user> <ip> <db password>"; | |
| exit 1; | |
| fi | |
| mysql --user=root --password=$1 <<EOF | |
| CREATE DATABASE wordpress; | |
| CREATE USER '$2'@'$3' IDENTIFIED BY '$4'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash -e | |
| tty=$(/bin/tty) | |
| ttyRemote="$1" | |
| ptsprogram="/root/bin/ptsSSH" | |
| while : | |
| do | |
| read -p "$ttyRemote> " input | |
| $ptsprogram -n $ttyRemote "$input > $tty"; | |
| done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var mediaJSON = { "categories" : [ { "name" : "Movies", | |
| "videos" : [ | |
| { "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org", | |
| "sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ], | |
| "subtitle" : "By Blender Foundation", | |
| "thumb" : "images/BigBuckBunny.jpg", | |
| "title" : "Big Buck Bunny" | |
| }, | |
| { "description" : "The first Blender Open Movie from 2006", | |
| "sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| tempuser=`echo "$RANDOM"| md5sum| head -c 10`; | |
| useradd -e `date -d "1 days" +"%Y-%m-%d"` $tempuser; | |
| su - $tempuser |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| awk '{a[$1]++} END {for (i in a) print a[i],i | "sort -rnk1"}' $1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Installation: | |
| # | |
| # 1. nano /etc/ssh/sshd_config | |
| # PrintMotd no | |
| # | |
| # 2. nano /etc/profile | |
| # /usr/bin/dynmotd # Place at the bottom | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # For pure Fedora 33 server: | |
| # Total download size: 5.8 G | |
| # Installed size: 21 G | |
| # Installed packages count: 5117 | |
| cat <<EOF | |
| Following groups are will be installed: | |
| "Fedora Custom Operating System" "Minimal Install" "Fedora Server Edition" "Fedora Workstation" "Fedora Cloud Server" "KDE Plasma Workspaces" "Xfce Desktop" "LXDE Desktop" "LXQt Desktop" "Cinnamon Desktop" "MATE Desktop" "Sugar Desktop Environment" "Deepin Desktop" "Development and Creative Workstation" "Web Server" "Infrastructure Server" "Basic Desktop" "3D Printing" "Administration Tools" "Audio Production" "Authoring and Publishing" "C Development Tools and Libraries" "Cloud Infrastructure" "Cloud Management Tools" "Compiz" "Container Management" "D Development Tools and Libraries" "Design Suite" "Development Tools" "Domain Membership" "Fedora Eclipse" "Editors" "Educational Software" "Electronic Lab" "Engineering and Scientific" "FreeIPA Server" "Games and Entertainment" "Headless Management" "LibreOffice" "MATE Applications" "Mi |