Labels

Android (1) Apache (1) bash (2) boost (2) C (37) C++ (5) cheatsheet (2) CLion (6) css (3) Debian (34) DL (17) dns (1) Docker (3) Dreamweaver (2) Eclipse (3) fail2ban (5) git (6) GitHub (5) Hacking (4) html (8) http (1) iOS (1) iPad (1) IRC (1) Java (33) javascript (3) Linux (182) Mac (21) Machine Learning (1) mySQL (53) Netbeans (6) Networking (1) Nexus (1) OpenVMS (6) Oracle (4) Pandas (3) php (17) Postgresql (8) Python (9) raid (1) RedHat (15) Samba (2) Slackware (52) SQL (14) ssh (1) svn (1) tar (1) ThinkPad (1) Virtualbox (4) Visual Basic (2) Visual Studio (1) Windows (7) wire (1)

Tuesday, 20 November 2018

jail.conf

# Fail2Ban jail specifications file
#
# Comments: use '#' for comment lines and ';' (following a space) for inline comments
#
# Changes:  in most of the cases you should not modify this
#           file, but provide customizations in jail.local file, e.g.:
#
# [DEFAULT]
# bantime = 3600
#
# [ssh-iptables]
# enabled = true
#

fail2ban.conf

# Fail2Ban main configuration file
#
# Comments: use '#' for comment lines and ';' (following a space) for inline comments
#
# Changes:  in most of the cases you should not modify this
#           file, but provide customizations in fail2ban.local file, e.g.:
#
# [Definition]
# loglevel = 4
#

[Definition]

# Option:  loglevel
# Notes.:  Set the log level output.
#          1 = ERROR
#          2 = WARN
#          3 = INFO
#          4 = DEBUG
# Values:  NUM  Default:  3
#
loglevel = 3

# Option:  logtarget
# Notes.:  Set the log target. This could be a file, SYSLOG, STDERR or STDOUT.
#          Only one log target can be specified.
#          If you change logtarget from the default value and you are
#          using logrotate -- also adjust or disable rotation in the
#          corresponding configuration file
#          (e.g. /etc/logrotate.d/fail2ban on Debian systems)
# Values:  STDOUT STDERR SYSLOG file  Default:  /var/log/fail2ban.log
#
logtarget = /var/log/fail2ban.log

# Option: socket
# Notes.: Set the socket file. This is used to communicate with the daemon. Do
#         not remove this file when Fail2ban runs. It will not be possible to
#         communicate with the server afterwards.
# Values: FILE  Default:  /var/run/fail2ban/fail2ban.sock
#
socket = /var/run/fail2ban/fail2ban.sock

# Option: pidfile
# Notes.: Set the PID file. This is used to store the process ID of the
#         fail2ban server.
# Values: FILE  Default:  /var/run/fail2ban/fail2ban.pid
#
pidfile = /var/run/fail2ban/fail2ban.pid

Monday, 19 November 2018

Slackware Configuration

Network/Host name
netconfig
/etc/rc.d/rc.inet1.conf
/etc/hosts
/etc/hosts.deny
/etc/hosts.allow
/etc/resolve

Runlevel

rc.d 
/etc/rc.d/rc.local
/etc/rc.d/rc.local_shutdown

SSHD
/etc/ssh

Samba
/etc/rc.d/rc.samba
/etc/samba/smb.conf

SendMail
/etc/rc.d/rc.sendmail

Spamassassin

Apache
/etc/rc.d/rc.httpd
/etc/httpd/httpd.conf
/etc/httpd/extras/

ProFTPd
/etc/inetd.conf
users allow file?
/etc/proftpd.conf

awstats
/etc/awstats/
/var/run/awstats/
/var/lib/swstats/
Cron job: TBA
Update data: perl awstats.pl -config=mysite -update

Fail2ban
/etc/fail2ban/
/etc/rc.d/rc.fail2ban

awstats

Location of files for awstats in Slackware.

Site configuration files:
/etc/awstats/

Binaries or such:
/var/run/awstats/

Data:
/var/lib/swstats/

Cron job:
TBA

Update data:
perl awstats.pl -config=mysite -update

Saturday, 27 October 2018

Compile C C++ in Linux

gcc source.c -o executable.o

Samba

Users must be added to system in normal way and then also added to samba as follows:

smbpasswd -a user

Wednesday, 13 June 2018

Change Form component from other class

To change a component on a form from another class, for example if we have a GUI which is the startup component and we have a slave class that does a lot of work, calculations, searching and such and we wish to update a coomponent on our form from within this slave class.



In the form class, which we’ll call GUI


slave s = new slave(this);// slave is the other class and “this” is a reference to itself, the GUI


In the other class, which we’ll call slave

GUI form; // where GUI is the name of the form class


    public slave(GUI formObject)//formObject is a reference to the GUI form passed by “this”.


    {
        form = formObject;
        //form.setVisible(true); // not needed as it’s already visible
    }

void changeButton()
    {
        form.setButtonText("hello"); // The setButtonText method is an accessible method in the GUI form
    }

Friday, 9 March 2018

GitHub - Pushing to remote is rejected as a result of email address being exposed

Problem with PyCharm & Clion and gitHub on Mac specifically…

Also found on Debian, probably affects all applications pushing to GitHub


Pushing to remote is rejected as a result of email address being exposed.

Check;

git config --global user.email

If this shows email address, change is as per below;

git config --global user.email “plisken1@users.noreply.github.com”

Tuesday, 30 January 2018

ECC Memory

WINDOWS 7 
wmic MEMORYCHIP get DataWidth,TotalWidth

LINUX
dmidecode -t 17