Posts

Showing posts from August, 2019

Stop and Start NFS and Related Services

Using restart option (i.e. service nfs restart) may crash / freeze your Linux computer if executed.

Stop NFS server:  

# service nfslock stop
# service nfs stop
# service portmap stop
# umount /proc/fs/nfsd

Start service in following order:
# service portmap start
# service nfs start
# service nfslock start
# mount -t nfsd nfsd /proc/fs/nfsd

Setting JDK in Eclipse

The list of available compilers are in the Window -> Preferences -> Java -> Installed JRE's tab.

Lambda is a fully managed compute service

Lambda is a fully managed compute service that runs your code in response to events generated by custom code or from various AWS services such as Amazon S3, DynamoDB, Kinesis, Amazon SNS, and Amazon Cognito.

The AWS SAM CLI is a separate command line tool that you can use to manage and test AWS SAM applications.

In addition to commands for uploading artifacts and launching AWS CloudFormation stacks that are also available in the AWS CLI, the SAM CLI provides additional commands for validating templates and running applications locally in a Docker container.

How to suspend and resume Linux processes

You can use kill to stop the process.

For a 'polite' stop to the process (prefer this for normal use), send SIGTSTP:

kill -TSTP [pid]
For a 'hard' stop, send SIGSTOP:

kill -STOP [pid]
Note that if the process you are trying to stop by PID is in your shell's job table, it may remain visible there, but terminated, until the process is fg'd again.

To resume execution of the process, sent SIGCONT:

kill -CONT [pid]

You can use AWS CLI to add multiple FQDN in a single command while creating a new ACM certificate.

Following is the command you can use to achieve this,

aws acm request-certificate --domain-name example.com  --validation-method DNS --subject-alternative-names b.example.comc.example.comd.example.com

A Gradle plugin that provides Maven-like dependency management functionality

A Gradle plugin that provides Maven-like dependency management functionality
https://github.com/spring-gradle-plugins/dependency-management-plugin

Build Your Java Project with Apache Maven

Once you set up your project, you can build it using Maven's package command.
mvn package
This creates your .jar file in the target directory.

SQL server Express vs developer

Developer Edition supports more features and larger databases. For example, if you want to restore a 88gb database from your production server onto your workstation to do testing, you'll need Developer Edition.

If you're working with Enterprise-only features like partitioning, compression or the Resource Governor. Those features aren't available in Express, but they are available in Developer Edition.

And SQL Express is quite capable of handling fair loads.

SQL Server Express does not require licensing but has a smaller set of features.

Developing against full SQL Server (and Developer Edition matches Enterprise Edition) always leaves the chance that you rely on some feature that is not in the production edition.

By default, Postfix configuration files are in /etc/postfix.

The two most important Postfix configuration files are main.cf and master.cf; these files must be owned by root.
Giving someone else write permission to main.cf or master.cf (or to their parent directories) means giving root privileges to that person.

Open source client for AnyConnect

"network-manager-openconnect-gnome" package in the Ubuntu Repository. It uses OpenConnect which is an open source client for AnyConnect.
You can find the package in the Ubuntu Software Center or Synaptic by searching for "OpenConnect."

If you wish to install it via the command-line, you can do so with:

sudo apt install network-manager-openconnect-gnome

Run Unix commands from within Vim

:shell :sh[ell] start a shell :! :!{command} execute {command} with a shell

Create a basic Maven package

mvn -B archetype:generate \
  -DarchetypeGroupId=org.apache.maven.archetypes \
  -DgroupId=org.example.basicapp \
  -DartifactId=myapp

Resources for preparing technical interviews

LeetCode is a social platform for preparing IT technical interviews. It strives to provide you with the best learning experience in preparing interviews for companies in the IT industry.

ProgrammerInterview.com is to help programmers successfully prepare for technical interviews. It does this by presenting a variety of questions, grouped by subject matter. This site is a great resource for any level of programmer – whether you are an entry level “fresher” just starting out your career, or an experienced senior level programmer who is looking for more advanced questions, it presents a wide variety of real interview questions.


AWS SDK Eclipse Toolkit provides an Eclipse plugin for you to both create a deployment package and also upload it to create a Lambda function.

AWS SDK Eclipse Toolkit plugin enables you to author Java code, create and upload a deployment package, and create your Lambda function.

Install docker on AWS EC2

sudo amazon-linux-extras install docker

SDKMAN! is a tool for managing parallel versions of multiple Software Development Kits on most Unix-based systems.

Example:
$ sdk install gradle 5.6.1

Build Anything by Gradle Build Tool

Write in Java, C++, Python or your language of choice. Package for deployment on any platform. Go monorepo or multi-repo. And rely on Gradle's unparalleled versatility to build it all.
https://gradle.org/

Shell script to identify duplicate Java classes.

mkdir -p expanded unzip path/to/my/i88ca.jar -d expanded find ./expanded/lib -name '*.jar'| xargs -n1 zipinfo -1 | grep '.*.class'| sort | uniq -c | sort

Solution: Unable to locate package on Ubuntu

Updating the package index:

sudo apt update

Next, install Maven by typing the following command:

sudo apt install maven

What version of Java is being used by Maven

mvn -version will output which java it's using.
$ mvn -version Apache Maven 3.0.5 (Red Hat 3.0.5-17) Maven home: /usr/share/maven Java version: 1.8.0_222-ea, vendor: Oracle Corporation Java home: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.222.b03-1.amzn2.0.1.x86_64/jre Default locale: en_US, platform encoding: UTF-8 OS name: "linux", version: "4.14.114-105.126.amzn2.x86_64", arch: "amd64", family: "unix"



How to solve: "ERROR: Maven JVM terminated unexpectedly with exit code 137"

In case your Jenkins CI fails to complete building your project but only logging the following:

ERROR: Maven JVM terminated unexpectedly with exit code 137

It means maven does NOT have enough memory available. To solve this, simply increase your MAVEN_OPTS memory. Or you may need to increase your system's memory. This is very likely if you run your Jenkins on a virtual machine and you are stingy of memory.

shade is bound to the package phase and is used to create a shaded jar.

Apache Maven Shade Plugin provides the capability to package the artifact in an uber-jar, including its dependencies and to shade - i.e. rename - the packages of some of the dependencies.
https://maven.apache.org/plugins/maven-shade-plugin/

The federal telecom regulator significantly lowered the wholesale rates

The federal telecom regulator significantly lowered the wholesale rates that smaller internet resellers pay to access broadband network infrastructure built by major providers like Bell Canada, Rogers.
The CRTC said it did so to increase choice, affordability and ensure a competitive marketplace across Canada.

Intel Project Athena machines

Intel unveiled the new Comet Lake 10th-gen chips that will power all sorts of notebooks later this year. 
Comet Lake chips will bring support for more cores, more RAM of the faster and more efficient variety, as well as faster Wi-Fi 6 support. 
These chips will power a special set of laptops that Intel certifies under the “Project Athena” program.
Project Athena machines are supposed to be ultraslim, light devices that feature all-day battery life, always-on internet, and AI support. 
Project Athena machines also have to deliver increased performance and responsiveness, and that includes the ability to turn on instantly.

Get the list of event source mappings while using AWS Lambda with Amazon Simple Queue Service

You can get the list of event source mappings by running the following command.

$ aws lambda list-event-source-mappings --function-name ProcessSQSRecord \
--event-source SQS-queue-arn
The list returns all of the event source mappings you created, and for each mapping it shows the LastProcessingResult, among other things. This field is used to provide an informative message if there are any problems. Values such as No records processed (indicates that AWS Lambda has not started polling or that there are no records in the queue) and OK (indicates AWS Lambda successfully read records from the queue and invoked your Lambda function) indicate that there no issues. If there are issues, you receive an error message.

Get Dell Service Tag from the command line

Get your Dell Service Tag from the command line


Windows: From a command prompt, type: wmic bios get serialnumber
Linux: From a terminal, type:
sudo -i dmidecode -s system-serial-number

MySQL uses DATEDIFF to compare two date type values.

DATEDIFF() returns expr1 − expr2 expressed as a value in days from one date to the other. expr1 and expr2 are date or date-and-time expressions. Only the date parts of the values are used in the calculation.

mysql> SELECT DATEDIFF('2007-12-31 23:59:59','2007-12-30');
        -> 1
mysql> SELECT DATEDIFF('2010-11-30 23:59:59','2010-12-31');
        -> -31

How to find all watching JIRA issues

watcher = currentUser()

How to temporarily disable an account on Windows 10

How to disable a Windows 10 account using Computer Management On Windows 10 Pro or Enterprise, you can use Computer Management to manage various aspects of an account, including the ability to restrict access to an account.

Open Start.
Search for Computer Management and click the top result to open the console.
Quick tip: You can also use the Windows key + X keyboard shortcut and selecting Computer Management.
Browse the following path:
System Tools > Local Users and Groups > Users
Double-click the account you want to disable. (If the user account is using a Microsoft account, note that the name will only use the first five letters of the email address. If you want the account to use a custom name, you can refer to this guide.)
Under the "General" tab, check the Account is disabled option.
Click Apply.
How to disable a Windows 10 account using Command Prompt If your device is running Windows 10 Home, you can use Command Prompt to disable or enable a Windows 10 account…

VMware bought Pivotal Software Inc in a $2.7 billion deal.

VMware to pay $5 billion for firms offering cloud security, developers platform

Get HttpServletRequest object in restful web service

@POSTpublicResponse post(@ContextHttpServletRequest request, @ContextHttpServletResponse response){ returnResponse .ok("pong2") .build(); }

Testing Rest APIs using Spring 5 WebTestClient

WebTestClient contains request methods that are similar to WebClient. 
In addition, it contains methods to check the response status, header and body.  You can also use assertion libraries like AssertJ with WebTestClient.

WebClient is part of Spring 5’s reactive web framework called Spring WebFlux.

To use WebClient, you need to include the spring-webflux module in your project.

Add Dependency in an existing Spring Boot project

If you have an existing Spring Boot project, you can add the spring-webflux module by adding the following dependency in the pom.xml file -

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-webflux</artifactId>
</dependency>

Spring Boot version 2.x.x is needed for using the Spring WebFlux module.

WebClient vs RestTemplate in Spring

Starting with Spring 5, the non-blocking and reactive WebClient offers a modern alternative to RestTemplate. WebClient offers support for both synchronous and asynchronous HTTP requests and streaming scenarios. Therefore, RestTemplate will be marked as deprecated in a future version of the Spring Framework and will not contain any new functionalities.

strace is a diagnostic, debugging and instructional userspace utility for Linux.

strace is a powerful command line tool for debugging and trouble shooting programs in Unix-like operating systems such as Linux. It captures and records all system calls made by a process and the signals received by the process.
strace is used to monitor and tamper with interactions between processes and the Linux kernel, which include system calls, signal deliveries, and changes of process state. The operation of strace is made possible by the kernel feature known as ptrace. Some Unix-like systems provide other diagnostic tools similar to strace, such as truss.

MySQL Warning | 1681 | 'INFORMATION_SCHEMA.INNODB_LOCK_WAITS' is deprecated and will be removed in a future release

For MySQL 8, use performance_schema

SELECTr.trx_id waiting_trx_id, r.trx_mysql_thread_id waiting_thread, r.trx_query waiting_query, b.trx_id blocking_trx_id, b.trx_mysql_thread_id blocking_thread, b.trx_query blocking_query FROMperformance_schema.data_lock_waits w INNER JOINinformation_schema.innodb_trx b ONb.trx_id=w.blocking_engine_transaction_idINNER JOINinformation_schema.innodb_trx r ONr.trx_id=w.requesting_engine_transaction_id;

How do I hide my IP address?

The most common method to hide your IP address is to use a proxy or a VPN

What is an IP Address?

The Internet Protocol Address (or IP Address) is a unique address that
computing devices such as personal computers, tablets, and smartphones
use to identify itself and communicate with other devices in the IP
network. Any device connected to the IP network must have a unique IP
address within the network. An IP address is analogous to a street
address or telephone number in that it is used to uniquely identify an
entity.

Azure Automation

Azure Automation delivers a cloud-based automation and configuration
service that provides consistent management across your Azure and
non-Azure environments. It consists of process automation, update
management, and configuration features. Azure Automation provides
complete control during deployment, operations, and decommissioning of
workloads and resources.

Alter MySQL table without locking

In case you are not sure if an ALTER TABLE will copy and/or block the table, and you want to make sure your DDL statement won’t cause such problems, you can add new alter specifications to the statement: ALGORITHM and LOCK.

ALTERTABLE i88ca ENGINE=InnoDB, LOCK=NONE; ALGORITHM [=] {DEFAULT|INPLACE|COPY}LOCK [=] {DEFAULT|NONE|SHARED|EXCLUSIVE}

Debug MySQL performance Script.sql

-- run as rootTEE mysql_output.txt; SELECT VERSION(); SELECT NOW(); SHOW GLOBAL VARIABLES; SHOW MASTER STATUS; SHOW SLAVE STATUS\G SHOW GLOBAL STATUS; SHOW FULL PROCESSLIST; SHOW ENGINE INNODB STATUS\G SHOW FULL PROCESSLIST; -- Info on transactions and locks SELECTr.trx_wait_startedAS wait_started, TIMEDIFF(NOW(), r.trx_wait_started) AS wait_age, rl.lock_tableAS locked_table, rl.lock_indexAS locked_index, rl.lock_typeAS locked_type, r.trx_idAS waiting_trx_id, r.trx_mysql_thread_idAS waiting_pid, r.trx_queryAS waiting_query, rl.lock_idAS waiting_lock_id, rl.lock_modeAS waiting_lock_mode, b.trx_idAS blocking_trx_id, b.trx_mysql_thread_idAS blocking_pid, b.trx_queryAS blocking_query, bl.lock_idAS blocking_lock_id, bl.lock_modeAS blocking_lock_mode FROMinformation_schema.INNODB_LOCK_WAITS w INNER JOINinformation_schema.INNODB_TRX b ONb.trx_id=w.blocking_trx_idINNER JOINinformation_schema.INNODB_TRX r ONr.trx_id=w.requesting_trx_idINNER JOINinformation_schema.INNODB_LOCKS …

How to deal with Lock wait timeout exceeded in MySQL

Run SHOW ENGINE INNODB STATUS\G after your failed statement, you can find what caused the lock.

pt-deadlock-logger - Log MySQL deadlocks

can do this job for you.

You should consider increasing the lock wait timeout value for InnoDB by setting the innodb_lock_wait_timeout

show variables like 'innodb_lock_wait_timeout';

SET innodb_lock_wait_timeout = 120; (only for current session)

Or

SET GLOBAL innodb_lock_wait_timeout = 120;

or put to configuration file:

[mysqld]
innodb_lock_wait_timeout=120

MySQL how to get non sleep processlist

$ mysqladmin --login-path=root processlist | grep -v 'Sleep' | less

Get only process ids:
$ mysqladmin --login-path=root processlist | grep -v 'Sleep'  | awk -F '|' '{print $2}'
Others:
SELECT*FROMINFORMATION_SCHEMA.PROCESSLIST; SELECT*FROMINFORMATION_SCHEMA.PROCESSLISTwhere command !='Sleep'; SELECT*FROMINFORMATION_SCHEMA.PROCESSLISTwhere command !='Sleep'and STATE !='Waiting for table metadata lock'; SELECTcount(*) FROMINFORMATION_SCHEMA.PROCESSLISTwhere STATE ='Waiting for table metadata lock';

Change the background color and design of all your Office programs

To change the background color and design of all your Office programs, go to  File > Options > General > Office Theme.

If you are a G Suite admin, consider the following best practices to generally improve security:

if you are a G Suite admin, consider the following best practices to generally improve security:
Review and verify current OAuth API access by third-parties.Run OAuth Token audit log reports to catch future inadvertent scope grants and set up automated email alerts in the Admin console using the custom alerts feature, or script it with the Reports API.Turn on 2-step verification for your organization and use security keys.Follow the security checklist if you feel that an account may be compromised.Help prevent abuse of your brand in phishing attacks by publishing a DMARCpolicy for your organization.Use and enforce rules for S/MIME encryption

Do SPF Records apply to subdomains?

You need to have separate SPF records for each subdomain you wish to send mail from. http://www.openspf.org/FAQ/The_demon_question

This makes sense - a subdomain may very well be in a different geographical location which will have a very different SPF definition.

The 'include:' directive for SPF may be used to provide all subdomains with the same entries. For example, on the SPF record for subdomain mailfrom.example.com enter 'include:example.com'. In this fashion whenever you update the definition for example.com your subdomains will automatically pick up the updated values.

If a subdomain is created as a CNAME record, the SPF record is the one for the domain it points to, e.g. sub.domain.com is a CNAME of otherdomain.com, the SPF a mail server will get when it looks up mail@sub.domain.com is in the DNS record for otherdomain.com. This is the same if the CNAME record says sub.domain.com => othersub.domain.com, so your TXT record would need to be othersub, not sub…

PowerMTA pmta command

Usage: pmta [options] command

where 'options' are:
    --help                display this message
    --xml                 display result in XML
    --dom                 display result as DOM-like "variables"

and where 'command' is one of:
    clear dnscache domainname
    check mfrom [--tcp] [--dumppackets] mfrom ip
    check spf [--tcp] [--dumppackets] ip heloDomain [mailFrom]
    delete [--dsn] [--queue=domain[/vmta]] [--orig=addr] [--rcpt=addr] [--jobId=id] [--envId=id] [--older-than=time-interval] [--no-accounting]
    deregister [--user=name] [--local-only] [--retain-unloaded]
    disable source [--reenable-after=interval] ip domain[/vmta]
    enable source ip domain[/vmta]
    list [--queue=domain[/vmta]] [--orig=addr] [--rcpt=addr] [--jobId=id] [--envId=id] [--maxitems=n] [--older-than=time-interval] [--pause] [--priority] [--schedule]
    pause queue domain[/vmta]
    pause job jobid
    register [--user=name] [--label=name] [--webmon-ip=ip] [--we…

From address for DKIM and SPF

SPF is checking on the envelop's from address such as "Mail From" or smtp.from.

DKIM is checking on the inside letter's from address, not the envelop's from address.

MySQL: How to check foreign keys related to a table

SELECT TABLE_NAME, COLUMN_NAME, CONSTRAINT_NAME, REFERENCED_TABLE_NAME, REFERENCED_COLUMN_NAME FROMINFORMATION_SCHEMA.KEY_COLUMN_USAGEWHERE REFERENCED_TABLE_NAME ='Your_Table';

DROP all foreign keys in MYSQL.sql

SELECT CONCAT('ALTER TABLE ', TABLE_NAME, ' DROP FOREIGN KEY ', CONSTRAINT_NAME, ';') FROMinformation_schema.key_column_usageWHERE CONSTRAINT_SCHEMA ='db_name'AND referenced_table_name IS NOT NULL;

Enable Dark Mode Theme in Microsoft Edge

In the Edge browser, bring up the menu by hitting the three dot icon on the far right menu bar.·Select Settings on the bottom of the menu.·On the very top of the Settings menu, change the theme from light to dark.

Bash script to check Linux performance

script -c 'bash --norc' /path/to/check_linux.txt PS1="\u@\H:\w [\t]\$" date uname -a dmidecode -s system-product-name ls -1 /dev/disk/by-id/ uptime df -Th free -m mount | column -t top -b -n 4 -d 1 iostat -xctdk 3 20 vmstat 3 20 mpstat -P ALL 3 20 ifconfig ps auxfww | grep -E 'mysqld|ndbd|ndbmtd' lsof -s | grep -E 'mysqld|ndbd|ndbmtd' lsb_release --all lscpu cat /proc/cpuinfo cat /proc/meminfo cat /proc/vmstat sysctl -a | egrep -i "dirty|swappiness|file-max|threads-max" getenforce numastat numactl --show numactl --hardware cat /proc/sys/vm/numa_zonelist_order cat /etc/selinux/config cat /proc/meminfo| egrep -i "cached|dirty|writeback" cat /proc/vmstat | egrep -i "dirty|writeback" cat /proc/sys/vm/nr_pdflush_threads ulimit -a

LG’s G8X will be its first phone with an in-display fingerprint sensor

G8X is set to be revealed next month at the annual IFA show in Germany.

MySQL Got an error reading communication packets

Possible reasons for the "Got an error reading communication packets" messages:

Deploying a new application or making changes to an existing application. Reducing the value one of the following timeout options: interactive_timeout, net_read_timeout, net_write_timeout, wait_timeout. Increasing the error log verbosity: To log_error_verbosity = 3 in MySQL 5.7 and later. To log_warnings = 2 in MySQL 5.6 and earlier. Upgrading to MySQL Server 5.7.
log_error_verbosity
PropertyValue Command-Line Format--log-error-verbosity=# System Variablelog_error_verbosity ScopeGlobal DynamicYes SET_VAR Hint AppliesNo TypeInteger Default Value (>= 8.0.4)2 Default Value (<= 8.0.3)3 Minimum Value1 Maximum Value3


$ mysql --login-path=root -e "show variables like '%log_error_verbosity%';" +---------------------+-------+ | Variable_name | Value | +---------------------+-------+ | log_error_verbosity | 3 | +---------------------+-------+ mysql> set global log_erro…

FIDO2 is a set of such standards that enable logins backed by strong cryptographic security.

The FIDO Alliance, which stands for Fast Identity Online, is an
industry body on a mission to solve the problem of passwords through
the use of open standards to drive technologies that can securely
replace them.

A50 is one of your cheapest Galaxy options

A50 features a 6.4-inch display, an in-screen fingerprint reader and a
headphone jack. On the back are three cameras, which include a
wide-angle lens as well as a "depth lens," which is used to take
portrait shots with blurry, dramatic backgrounds.

Microsoft Windows HTTP Services (WinHTTP) provides you with a server-supported, high-level interface to the HTTP/2 and 1.1 Internet protocols.

WinHTTP is designed to be used primarily in server-based scenarios by server applications that communicate with HTTP servers.

netsh.exe winhttp

The following commands are available:

Commands in this context:
?              - Displays a list of commands.
dump           - Displays a configuration script.
help           - Displays a list of commands.
import         - Imports WinHTTP proxy settings.
reset          - Resets WinHTTP settings.
set            - Configures WinHTTP settings.
show           - Displays currents settings.

To view help for a command, type the command, followed by a space, and then
 type ?.

Check Proxy Server Settings in Windows 10

netsh.exe winhttp show proxy

Current WinHTTP proxy settings:

Direct access (no proxy server).

Windows Proxy settings by Powershell

To check the proxy settings like ProxyOveride or if it is enabled or not:

Get-ItemProperty -Path
"Registry::HKCU\Software\Microsoft\Windows\CurrentVersion\Internet
Settings"
To disable proxy from PowerShell:


Set-ItemProperty -Path
"Registry::HKCU\Software\Microsoft\Windows\CurrentVersion\Internet
Settings" ProxyEnable -value 0
To enable proxy from PowerShell:

Set-ItemProperty -Path
"Registry::HKCU\Software\Microsoft\Windows\CurrentVersion\Internet
Settings" ProxyEnable -value 1

Use Socks Proxy for ssh

Use Proxy for SSH
Add the following to your SSH config file, say ~/.ssh/config:

ProxyCommand nc -x localhost:1080 %h %p
This is to make all SSH connections via the socks5 proxy at localhost:1080.

If you want to use a HTTP proxy at localhost:1080, do it like:

ProxyCommand nc -X connect -x localhost:1080 %h %p

PrivX uses short-term credentials to provide just-in-time access to servers.

Access is granted based on the user's role. Provisioned credentials
are created on demand, only valid for a short time, and never stored
to disk.

Improve security
Access to endpoints is provisioned using on-demand short-lived
certificates that are valid for only a few minutes and never written
to disk nor exposed to end-users. This completely eliminates the risk
of credential theft, removing the greatest security risk in privileged
access management.

Reduce costs
PrivX works using existing SSH clients and servers, so there is no
need to add or replace components of the SSH infrastructure. The lack
of dependence on external components translates to minimal disruptions
to network infrastructure, and reduced maintenance costs.

Using short-lifetime access certificates provided by PrivX eliminates
the need for certificate revocation or key rotation.
https://help.ssh.com/support/solutions/articles/36000036925-privx-administrator-manual#idp4

Git is a must-have skill for developers

Git has become the distributed version control system of choice for modern development.

Log In to a Oracle cloud VM Using SSH

Oracle-provided Oracle Linux instance has the default user opc.

The opc user has sudo privileges.

You can use SSH to log in to your instance as the default user, opc,
by using the following command:

ssh opc@ip_address —i private_key

MySQLdump example

mysqldump --defaults-file="c:\i88ca\appdata\local\temp\tmpjavwgi.cnf"  --login-path=i88ca --protocol=tcp --allow-keywords=TRUE --port=3306 --default-character-set=utf8 --routines --events --column-statistics=0 "your-database"

How to remove windows.old

Delete your previous version of Windows

Ten days after you upgrade to Windows 10, your previous version of
Windows will be automatically deleted from your PC. However, if you
need to free up disk space, and you're confident that your files and
settings are where you want them to be in Windows 10, you can safely
delete it yourself. Keep in mind that you'll be deleting your
Windows.old folder, which contains files that give you the option to
go back to your previous version of Windows. Deleting your previous
version of Windows can't be undone.
1
In the search box on the taskbar, type settings, then choose it from
the list of results.
2
Select System > Storage > This PC and then scroll down the list and
choose Temporary files.
3
Under Remove temporary files, select the Previous version of Windows
check box and then choose Remove files.

Check PowerShell version

$PSVersionTable.PSVersion

Circular reference where a link is pointing back onto itself.

You can use find to find out circular reference:

$ cd /suspected/directory
$ find -L ./ -mindepth 18

$ cd /usr/bin/
i88ca@ubuntu:/usr/bin$ find -L ./ -mindepth 18
find: ‘./eclipse’: Too many levels of symbolic links
find: File system loop detected; ‘./X11’ is part of the same file system loop as ‘./’.


Sample working backup script for MySQL

#!/bin/bash#echo "analyzing all tables";#mysqlcheck -Aa BACKUPFILE=$(date +"i88-%m-%d-%y-%H%M.sql"); echo"starting sql dump"; date; #using bzip2 use up less space, but slower#mysqldump --max_allowed_packet=1G --compress --quick --lock-tables --add-locks --comments --compact --dump-date --routines --triggers i88 | bzip2 > /home/i88ca/database/$BACKUPFILE.bz2 mysqldump --login-path=local --max_allowed_packet=1G --comments --dump-date --routines --triggers --events --lock-all-tables i88 > /var/lib/mysql/$BACKUPFILEecho"backup complete" date; #delete backup files older than 2 weeks.#/usr/bin/find /path/to/database/ -name "i88*.sql" -mtime +14 -delete

Each G Suite promotion code provides 20% off the first year.

G Suite Basic
Unused US Code | Expires 01/2020
G3UEP3KE6C9WLRH
G Suite Basic
Unused US Code | Expires 01/2020
Q347KFUUXK9EXRC

With Azure Lab Services, you can easily set up and provide on-demand access to preconfigured virtual machines.

Azure lab Service is suitable to deploy the following scenarios:

Professional training or school classes
Hackathons
Hands-on labs
Environments for demo
Machines for development and test environments

How to recursively delete an entire directory on Windows

Remove-Item -Recurse -Force some_dir

Amavis-new is a wrapper that can call any number of content filtering programs

Amavis-new is a wrapper that can call any number of content filtering
programs for spam detection, antivirus, etc.
https://help.ubuntu.com/community/PostfixAmavisNew

Restart The Hyper-V Virtual Machine Management service

From an admin command prompt:

PS C:\Program Files> net stop vmms The Hyper-V Virtual Machine Management service is stopping. The Hyper-V Virtual Machine Management service was stopped successfully.
PS C:\Program Files> net start vmms The Hyper-V Virtual Machine Management service is starting. The Hyper-V Virtual Machine Management service was started successfully.
PS C:\Program Files>

Enable the Hyper-V and Containers feature on Windows pro / server

PS C:\WINDOWS\system32> Install-Module DockerProvider

Untrusted repository
You are installing the modules from an untrusted repository. If you trust this repository, change its
InstallationPolicy value by running the Set-PSRepository cmdlet. Are you sure you want to install the modules from
'PSGallery'?
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "N"): Y
PS C:\WINDOWS\system32>