-
name of the current banch and nothing else (for automation)
git rev-parse --abbrev-ref HEAD
-
all commits that your branch have that are not yet in master
git log master..<HERE_COMES_YOUR_BRANCH_NAME>
This file contains 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 | |
apt-get install mc htop git unzip wget curl -y | |
echo | |
echo "=====================================================" | |
echo " WELCOME" | |
echo "=====================================================" | |
echo | |
echo "Hub" |
This file contains 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
main: # 'main' is the GitLab 'provider ID' of this LDAP server | |
label: 'Zimbra LDAP' | |
host: 'ldap.zimbra.com' | |
port: 389 | |
uid: 'uid' | |
method: 'plain' # "tls" or "ssl" or "plain" | |
bind_dn: 'uid=zimbra,cn=admins,cn=zimbra' | |
password: 'PASSWORD' | |
active_directory: false | |
allow_username_or_email_login: true |
This file contains 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
HTTP proxy | |
This example overrides the default docker.service file. | |
If you are behind an HTTP proxy server, for example in corporate settings, you will need to add this configuration in the Docker systemd service file. | |
Create a systemd drop-in directory for the docker service: | |
sudo mkdir /etc/systemd/system/docker.service.d | |
Create a file called /etc/systemd/system/docker.service.d/http-proxy.conf that adds the HTTP_PROXY environment variable: |
This file contains 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
sudo docker rm $(sudo docker ps -a -q) -f |
This file contains 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
Let's Encrypt: | |
sudo apt install git bc nginx | |
sudo git clone https://github.com/certbot/certbot.git /opt/letsencrypt | |
Automatic renewal: | |
sudo crontab -e | |
30 2 * * 1 /opt/letsencrypt/letsencrypt-auto renew >> /var/log/le-renew.log | |
35 2 * * 1 /etc/init.d/nginx reload | |
To sign certificates, the Let's Encrypt API needs to verify that you own the domain for the certificate. |
This file contains 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
sudo apt-get install mysql-server | |
sudo mysql_secure_installation | |
CREATE DATABASE mail; | |
GRANT SELECT ON mail.* TO 'mail'@'localhost' IDENTIFIED BY 'mailpassword'; | |
FLUSH PRIVILEGES; | |
USE mail; | |
This file contains 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
/* | |
Mohammad Shafiee | |
Parsian Business Accelerator | |
www.parsian.ac | |
muhammad.shafiee-at-gmail.com | |
*/ | |
package data | |
import ( |
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<zabbix_export> | |
<date>2017-02-16T10:30:20Z</date> | |
<graphs> | |
<graph> | |
<graph_items> | |
<graph_item> | |
<calc_fnc>2</calc_fnc> | |
<color>157419</color> | |
<drawtype>1</drawtype> |
This file contains 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
Failed attempts by username: | |
grep "Invalid user " /var/log/auth.log | cut -d' ' -f8 | awk '{a[$0]++}END{for(i in a)print i,a[i]}' | sort -k 2 -n -r | head -n 100 | |
IP address of each attempt: | |
grep "Invalid user " /var/log/auth.log | cut -d' ' -f10 | awk '{a[$0]++}END{for(i in a)print i,a[i]}' | sort -k 2 -n -r | head -n 100 | |
Filter for brute-force interactive SSH logins: | |
grep sshd.\*Failed /var/log/auth.log | less | |
Look for failed connections (i.e. no login attempted, could be a port scanner, etc.): |
OlderNewer