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
<VirtualHost *:8011> | |
DocumentRoot /var/www/html/ | |
ServerName example.com | |
ServerAlias www.example.com | |
ServerAdmin [email protected] | |
ErrorLog logs/www.example.com-error_log | |
CustomLog logs/www.example.com-access_log common | |
</VirtualHost> |
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
# List complehensions zipping elements | |
ranks | |
['2', '3', '4', '5', '6', '7', '8', '9', '10', '11', 'J', 'Q', 'K', 'A'] | |
suits | |
['spades', 'diamonds', 'clubs', 'heats'] | |
[(rank, suit) for rank in ranks for suit in suits] | |
[('2', 'spades'), ('2', 'diamonds'), ('2', 'clubs'), ('2', 'heats'), ('3', 'spades'), ('3', 'siamonds'), ('3', 'clubs'), ('3', 'heats'), ('4', 'spades'), ('4', 'siamonds'), ('4', 'clubs'), ('4', 'heats'), ('5', 'spades'), ('5', 'siamonds'), ('5', 'clubs'), ('5', 'heats'), ('6', 'spades'), ('6', 'siamonds'), ('6', 'clubs'), ('6', 'heats'), ('7', 'spades'), ('7', 'siamonds'), ('7', 'clubs'), ('7', 'heats'), ('8', 'spades'), ('8', 'siamonds'), ('8', 'clubs'), ('8', 'heats'), ('9', 'spades'), ('9', 'siamonds'), ('9', 'clubs'), ('9', 'heats'), ('10', 'spades'), ('10', 'siamonds'), ('10', 'clubs'), ('10', 'heats'), ('11', 'spades'), ('11', 'siamonds'), ('11', 'clubs'), ('11', 'heats'), ('J', 'spades'), ('J', 'siamonds'), ('J', 'clubs'), ('J', 'heats'), ('Q', 'spades'), ('Q', 'siamonds'), ('Q', 'clubs') |
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
04fdd136f1e31394a8c833b66cacfe9e23f8147d020ecbbd917ffc4e9cb5417a2493ef1a300604fb5721809e88863f84d242f17c0924a6bdaf3f5a45ec689b2215 |
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 | |
# Program to output a system information page | |
TITLE="System Information Report for $HOSTNAME" | |
TIME=$(date +%F:%T) | |
TIMESTAMP="Generated $TIME, by $USER uid: $(id -u)" | |
TOTALSPACE=$(df -h) | |
SELIUX_STATE=$(sestatus | head -1 ; sestatus | grep --color=auto "Current mode";) | |
LARGEST_FILES=$(du -a /home 2>/dev/null | sort -n -r | head -n 10) | |
type systemd 2>/dev/null && SERVICES=$(systemctl -t service) || SERVICES=$(chkconfig --list) #for cebos6.8 |
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 | |
# iptables - usefull rules and more | |
printf "1. IP praleidimas" | |
printf "2. ssh praleidimas" | |
printf "3. http ir https praleidimas:" | |
printf "4. blokavimas per pietų pertrauką:" | |
printf "5. minimali ddos apsauga:" | |
printf "6. Praleidziam localhost:" |
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 | |
Reading | |
#################################### | |
read -e -p "Enter value: " value # saves read input to var, $value | |
read -n 1 -p "Type a character > " #reads one character saves to default read var $REPLY | |
Cheking | |
#################################### |
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
[Desktop Entry] | |
Encoding=UTF-8 | |
Name=Game | |
Type=Link | |
URL=/usr/games/kblocks | |
Icon=/home/user/Pictures/inc/tetris-64x64.png | |
Name[en_US]=Tetris game | |
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
#!/usr/bin/python3 | |
T = ["abc",1, 10, [3,2,5], 20, [5,5], "50" ] | |
newList=[] | |
def nested_sum(newstedList): | |
''' | |
newstedList: list composed of nested lists containing int. | |
newlist: New flat list composed of list elements. | |
''' |
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
#most used commands | |
history | awk 'BEGIN {FS="[ \t]+|\\|"} {print $3}' | sort | uniq -c | sort -nr | head | |
#Text to hex | |
echo "Labas" | od -t x1 |
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 testing | |
#notify-send -u critical "$(xsel -o)" | |
echo "$(xsel -o)" | espeak |
NewerOlder