Labels

Android (1) Apache (1) bash (2) boost (2) C (36) C++ (4) cheatsheet (2) CLion (6) css (3) Debian (33) DL (17) 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 (181) Mac (21) Machine Learning (1) mySQL (52) Netbeans (6) Networking (1) Nexus (1) OpenVMS (6) Oracle (3) 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 (5) wire (1)

Wednesday, 16 August 2023

MySQL paging or scrolling

We can use the following to prevent query results from scrolling to the end of the results;

\P /usr/bin/less

or alternatively;

pager less -S

This will act like grepping a file to less (cat somefile | less)

\n or nopager will return to normal.

Additionally, we can use the \G at the end of a query to output results vertically, say we have too many columns. For example show slave status\G;


Wednesday, 9 August 2023

monit summary showing "error connecting to the monit daemon"

I've had this several times and while it's been an issue, it's never really bothered me enough to investigate. I have however since found this to be a result of there being no "lo" interface up. when running ifconfig it was missing, so simply bringing this up by ifup lo resolved.

Clear bash history

history -c && history -w

[source]

Thursday, 3 August 2023

XFCE desktop configuration file

 can be found here: /usr/share/applications/appName.desktop

Thursday, 13 July 2023

Network Configuration in OpenBSD

Edit /etc/rc.conf

Change

ifconfig_em0="DHCP"

to

ifconfig_em0="inet 192.168.56.105 netmask 255.255.25.0"

and add

defaultrouter="192.168.56.1"

edit /etc/resolve.conf as per Linux and then do;

service netif restart && service routing restart

[source]

 

Tuesday, 20 June 2023

Copy file To Remote using ssh

scp

To copy a file from one local machine to a remote machine using ssh, do the following;

scp /local/path/to/file username@ip_address:/path/to/remote/destination

or if we wish to get a file from a remote machine to the local machine, we can do;

scp username@ip_address:/path/to/remote/file /local/path/to/destination