Skip to main content

Posts

Showing posts from June, 2017

How to configure power saving on Mac

You can use the following instructions to change your selected power settings. Click on the "Apple" icon in the top left hand corner. Select "System Preferences." On the System Preferences screen, click on the "Energy Saver" icon.

How to restrict inputText format in JSF

You can use prime faces 

<p:inputMaskvalue="# {maskController.date}"mask="99/99/9999"/>Or you use <f:convertNumbermaxFractionDigits="2"groupingUsed="true"currencySymbol="$"maxIntegerDigits="4"type="currency"/>Or you use RegEx Validator.

Microservice is an architecture style and pattern in which complex systems are decomposed into smaller services that work together to form larger business services. Microservices are services that are autonomous, self-contained, and independently deployable.

Microservice is an architecture style and pattern in which complex systems are decomposed into smaller services that work together to form larger business services. Microservices are services that are autonomous, self-contained, and independently deployable.

HTTP Strict Transport Security tells web browsers to only access your site over HTTPS in the future, even if the user attempts to visit over HTTP or clicks an http:// link.

HTTP Strict Transport Security tells web browsers to only access your site over HTTPS in the future, even if the user attempts to visit over HTTP or clicks an http:// link.

Mozilla Web Security Guidelines (HSTS)MDN on HTTP Strict Transport Security

Google Budget and alerts

Under Billing > Budget and alerts, you probably want to setup an alert for a Budget amount in case your project unexpectedly starts to spend more money than you expect.

Under App Engine > Settings, you probably want to setup a Daily spending limit, again in case your project unexpectedly starts to spend more money than you expect.

Canonical informs Ubuntu users that it updated the systemd packages in the Ubuntu 16.10 (Yakkety Yak) and Ubuntu 17.04 (Zesty Zapus) operating systems to patch a recently discovered security issue.

The new systemd vulnerability (CVE-2017-9445) appears to affect the systemd-resolved component, which could allow a remote attacker to crash the systemd daemon by causing a denial of service or run malicious programs on the vulnerable, unpatched machines by using a specially crafted DNS response.

How to emulate database triggers at the application level

Frameworks such as Hibernate Envers can emulate database triggers at the application level.

The advantage is that you don't need to mind the database-specific syntax for triggers since events are captured anyway by the Persistence Context.

The disadvantage is you can't log data change events that don't flow through the application (e.g. changes coming from a database console or from other systems that share the same RDBMS).

Online Transaction Processing - An OLTP system always shows the latest state of our data

In OLTP (Online Transaction Processing) systems, data is accessed and changed concurrently by multiple transactions and the database changes from one consistent state to another.

An OLTP system always shows the latest state of our data, therefore facilitating the development of front-end applications which require near real time data consistency guarantees.

Be Alert to the Email Attachment You Received

Viruses, Trojans and worms can be transmitted through email links or attachments. These attachments can be in any type of documents. Please be mindful of the potential risks when opening an attachment in emails. DO NOT open email attachments from unknown sources. Please verify the sender’s identity before opening the emails and the attachments associated with it.DO NOT open executable files (e.g. files with extension .exe) via email attachments. Malicious software is more likely to be found in an executable file.Scan every file with an anti-virus program (e.g. Kaspersky) before opening.
If you suspect your email account has been compromised, please change your email password immediately. You should also notify your friends as they may receive virus emails appeared to come from you.


Mailx simple example

It is very convenient to send email from command line using mailx # echo "this is the body of the email" | mailx -vvv -s "test mail" -r "From" -S smtp="your-smtp" [email protected]


-vvv = Verbosity. -s = Specifies the subject. -r = Email sent from. -S = Specifies the smtp server.

How to send attachments using mailx from command line

Use the attachment switch (-a) in mailx to send attachments with the mail. # mailx -a attatch.txt -s "Subject" [email protected] The above command will print a new blank line. Type the body of the message here and press [ctrl] + [d] to send. This will attach the file to the outbound email correctly with proper Content-Type and boundary headers. To make this more “scriptable”, you can send the message without a body with the following: # mailx -a file.txt -s "Subject" [email protected] < /dev/null To send mails with a message body, replace /dev/null in above command with your message body file.

It is better to send attachment by MIME Standard

It is better to send attachment by MIME Standard ("Multipurpose Internet Mail Extensions") because MIME has more new features for e-mail messages, such as:  arbitrary file attachments, e.g. images, audio filesmore than one file attachment per mailmulti-part messagesnon-ASCII character sets for message bodies and message headers.

How To Send an Email With Attachment from Linux Command line

To send the attachment using uuencode: 

$ uuencode  test_msg test_attach  | mailx -s "email subject" [email protected]

test_msg is the file you want to attach. test_attach is the file name the recipient will see.
See also:  How to fix: uuencode: command not found
To also send a body with the attachment:
$ ( cat my_body_file; uuencode  test_msg  test_attach ) | mailx -s "email subject" [email protected]
It is better to send attachment by MIME Standard ("Multipurpose Internet Mail Extensions") because MIME has more new features for e-mail messages, such as:  arbitrary file attachments, e.g. images, audio filesmore than one file attachment per mailmulti-part messagesnon-ASCII character sets for message bodies and message headers.mutt is an interactive, text-oriented e-mail client that can send attachment by MIME.
$ mutt -s "email subject" -a my_attach_file [email protected]my_body_file (You could have added multiple attachments by using multiple -a options…

Designate a catch-all address only when you really need it.

Spammers often try to guess email addresses in your domain; when they guess incorrectly, the spam is delivered to the catch-all address. The volume of incoming messages may well exceed the Gmail receiving limits, resulting in the account becoming locked or in legitimate messages being deferred, delayed, or bounced.

The envelope sender is where computers should respond

The envelope sender is where computers should respond (in the case of bounce messages or errors); the From: address is where people should respond. In most cases, the envelope sender and the From: address match. But they don't always, and they don't have to. 

Email anti-spam techniques

There are two big kinds of anti-spam techniques,

content based technique connection based technique
Content based technique use mail content for detecting spam mail. Connection based technique doesn't use mail content, just use connected host, from address, recipient addresses and so on for detecting spam mail.

Connection based technique has good detection rate and more lower load than content based technique. But it will not work well against spam mails that uses normal mail server like Gmail. But content based technique will be able to detect spam mails that can't be detected by connection based technique.

Mainstream anti-spam technique:
detects most spam mails by connection based technique.detects spam mails that can't be detected by connection based technique by content based technique. See also:
Why an IP / Domain might have a poor reputation / spam related issue

Email spamming related to IP address

Waterfalling – is when multiple Email Sending providers ( ESP ) are being used to send email. In this case, each ESP is using it’s own block of IP addresses. Spammers use one ESP to clean their lists, also called scrubbing, and another to send the actual marketing email. This technique is used by spammers and gray mailers.Snowshoe Spamming – is a spamming technique where a wide range of IP addresses are used to spread out the spam send rate and or load. Using a wide range of IP addresses makes it difficult for ISP’s to successfully identify the spam resulting in some of the spam to slip through.IP hopping – is simply using one set of IP addresses today, and next week you use new ones. ISP’s might throw you into the category of Snowshoeing or Waterfalling. If for some reason you have to change your IP’s, make sure they get warmed up properly, by relaying only a few mails per day through them. It takes a very long time to build a proper reputation for IP’s.The complete IP check for send…

Why an IP / Domain might have a poor reputation / spam related issue

There have been reports of spam from your IP. Look up your IP's reputation on SenderBase.Your IP exhibits DNS patterns that indicate compromise by a SpamBot. Make sure your DNS is configured according to the protocol for RFC2821, section 4.1.1.1 (http://www.imc.org/ietf-smtp/mail-archive/msg00827.html)Your IP contained links to domains hosting or distributing malwareChecking your ip/domain: http://multirbl.valli.org/dnsbl-lookup/ One way to avoid having your email inadvertently blocked is by registering your domain and IP addresses at EmailReg.org. Emails from domain names and IP addresses that are properly registered on EmailReg.org can be automatically exempted from spam filtering defense layers on Barracuda Spam Firewalls and other anti-spam solutions, preventing your email from being accidentally blocked.

https://support.proofpoint.com/dnsbl-lookup.cgi?ip=

Azure VPN Gateway allows your customers to connect their on-premises networks and individual client computers securely to Azure

It is over industry standard connections such as IPSEC and SSTP. With flexible deployment choices and no region constraints, VPN Gateway gives your customers high availability and secure connections from anywhere, anytime.

✓ Industry-standard Site-to-Site (S2S) IPsec VPNs
✓ Point-to-Site (P2S) VPN access from anywhere
✓ Up to 99.95 percent or higher uptime service-level agreement (SLA) for VPN gateways
✓ Highly available and easy to manage
✓ Secure connections from anywhere

The Day of the Programmer is an international professional day recognized in many technology companies and programming firms

The Day of the Programmer is celebrated on the 256th (hexadecimal 100th, or the 28th) day of each year (September 13 during common years and on September 12 in leap years). It is officially recognized in Russia. The number 256 (28) was chosen because it is the number of distinct values that can be represented with an eight-bit byte, a value well-known to programmers.256 is also the highest power of two that is less than 365, the number of days in a common year.

How to fix gparted problem

Run  sudo apt -y install --reinstall gparted
to force the package to be reinstalled even though the system thinks it already is.

Then you can run
sudo gparted &

How to reconnect to the existing session on xrdp

Edit the xrdp.ini file set port = ask connect from the remote machine, and at login if you have no existing session, specify port -1 to look for a free port.
To resume a session enter the default of 5910 or the port of your existing session.

How to Setup VNC Server (Linux Remote Desktop Access) on CentOS/RHEL 7 and Fedora

See also:
How to Install xrdp on CentOS 7 / RHEL 7

Install vnc package:
sudo dnf -y install tigervnc-server

Add user: ( or just use existing linux user)
sudo useradd
Set VNC password for that user
vncpasswd

sudo cp /lib/systemd/system/vncserver@.service /lib/systemd/system/vncserver@:1.service
(1 is the display number, you can setup 2, 3 ...)

sudo cat /lib/systemd/system/vncserver@\:1.service

[Unit]
Description=Remote desktop service (VNC)
After=syslog.target network.target

[Service]
Type=forking
# Clean any existing files in /tmp/.X11-unix environment
ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'
ExecStart=/sbin/runuser -l <USER> -c "/usr/bin/vncserver %i"
PIDFile=/home/<USER>/.vnc/%H%i.pid
ExecStop=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'

[Install]

WantedBy=multi-user.target


sudo systemctl daemon-reload
sudo systemctl enable vncserver@:1.service sudo systemctl start vncserver@:1.service
Check the…

JMS Redundancy

A message must confirm that it has completed its transaction and that it can now be removed from the queue, but if the transaction fails it can be reprocessed. The messages can also be stored in a database allowing them to continue later on even if the server stops.

Vue The Progressive JavaScript Framework

Approachable

Already know HTML, CSS and JavaScript? Read the guide and start building things in no time!

Versatile

Simple, minimal core with an incrementally adoptable stack that can handle apps of any scale.

Performant

19kb min+gzip Runtime
Blazing Fast Virtual DOM
Minimal Optimization Efforts




GET STARTEDGITHUB

In Groovy, the methods which will be invoked are chosen at runtime.

This is called runtime dispatch or multi-methods. It means that the method will be chosen based on the types of the arguments at runtime. In Java, this is the opposite: methods are chosen at compile time, based on the declared types. The following code, written as Java code, can be compiled in both Java and Groovy, but it will behave differently: int method(String arg){return1;}int method(Object arg){return2;}Object o ="Object";int result = method(o); In Java, you would have: assertEquals(2, result); Whereas in Groovy: assertEquals(1, result); That is because Java will use the static information type, which is that o is declared as an

How to forward email by alias on Linux

Compare to .forward file, editing the aliases file instead is simpler since you can edit all the users in one spot instead of having to find different files:

vi /etc/aliases

#forwarding account(s)
alice: [email protected]
rob: [email protected], [email protected]

The final step is to update the aliases and then restart your mail program:

/usr/bin/newaliases
service postfix restart


How to forward mail to more than one address on Linux

In file: ~/.forward, you can have your mail forwarded to more than two addresses by adding more addresses, separated by a comma and a space.
For example: [email protected], [email protected]

Or one email per line:
[email protected]
[email protected]

SMTP Authentication Reply-Codes

CodeMeaningIssued by
qmail-smtpdHonored by
qmail-remote235Authentication Succeededyes yes 334Text part containing the [BASE64] encoded stringyes yes 432A password transition is neededno >= 0.75 454Temporary authentication failureyes n/a 500Authentication Exchange line is too long no n/a 501Malformed auth input/Syntax error yes n/a 503AUTH command is not permitted during a mail transaction yes n/a 504Unrecognized authentication type yes n/a 530Authentication required Submission moden/a 534Authentication mechanism is to weak no no 535Authentication credentials invalidyes yes 538Encryption required for requested authentication mechanismno no

The most common authentication methods required by the mail server

Your email program may not support any of the authentication methods required by the mail server.  The most common methods are PLAIN, LOGIN, CRAM-MD5, DIGEST-MD5, and NTLM.   For example, if you are administering a Microsoft IIS SMTP server, you must enable Basic Authentication by going here:
IIS Manager > local computer > Default SMTP Virtual Server > Properties > Access tab > Authentication > Basic Authentication > (checked)

Java provides a Scanner class that can be used as a text parser.

The Java class Scanner is used for text parsing. Scanner implements the AutoCloseable interface so we can use it in try-with-resources block.

It accepts a regular expression as a delimiter and returns tokens separated by the delimiter.


try (Scanner scanner = new Scanner(new File(filename));) {     while (scanner.hasNext()) {     String word = scanner.next();     System.out.println(word);     } }

By setting the delimiter appropriately, various parsing tasks can be accomplished. scanner.useDelimiter("put regular expression here");

Google G Suite is ad free.

Gmail is the world's preeminent email provider with more than 1.2 billion users.

No other email service protects its users from spam, hacking, and phishing as successfully as Gmail.

How to setup an alarm when your Lambda fails

Go to your CloudWatch Console:
Click "Alarms" at the left, and then Create Alarm.
Click "Lambda Metrics".
Look for your Lambda name in the listing, and click on the checkbox for the row where the metric name is "Errors". Click "Next".
Enter a name and description for this alarm.
Setup the alarm to be triggered whenever "Errors" is above 0, for 1 consecutive period(s).
Select "Sum" as the Statistic and the amount of minutes that's reasonable for your use case in the "Period" dropdown.
In the "Notification" box, click the Select a notification list dropdown and select your new SNS endpoint.
Click "Create Alarm".

Done,
You will always know if your code reported an error when finished. The error could be because of an error in the code itself or because your website is down.

How to sleep for some time in Bash script

You need to use the sleep command to add delay for a specified amount of time. The syntax is as follows for gnu/bash sleep command:

sleep NUMBER[SUFFIX]

Where SUFFIX may be:

s for seconds (the default)
m for minutes.
h for hours.
d for days.
To sleep for 5 seconds, use:
sleep 5

How to kill process on Mac

You can find it in /Applications/Utilities/ or open it from Spotlight with Command+Space and then type 'Activity Monitor' and the return key. Using Activity Monitor is very easy: Select the process name or ID you wish to kill (unresponsive apps will usually appear as red), and hit the red “Quit Process” button.

How to forward all of a user's incoming email to a different email address on Linux

You can either create a .forward file in their home directory (that includes one email address to deliver to per line) 
Here's an example of the .forward file method:
vi /home/i88ca/.forward

[email protected]
[email protected]


Why relaying your server mail

A very common way of transmitting email messages in server systems is by sending them directly to other mail servers on the Internet using the SMTP protocol. However, many networks filter outgoing SMTP connections (port TCP/25 outwards). Since default RHEL / CentOS / APS installations will try to send email messages this way, email based alert notifications might not go through as expected in all environments.

This issue is often resolved by making sure that the local mail server sends its outgoing mail through a relaying mail server.

How to send to multiple recipients using mailx from command line

To send the mail to multiple recipients, specify all the emails separated by a comma$ echo "This is message body" | mail -s "This is Subject" [email protected],[email protected] CC and BCC The "-c" and "-b" options can be used to add CC and BCC addresses respectively. $ echo "This is message body" | mail -s "This is Subject" -c [email protected] [email protected]

Echo One Day Deal

Echo will offer its lowest price yet this year on 6/26/17. Share this exciting promotion with your readers and take advantage of the savings. There is no better time for your readers to grab an Echo and get Alexa-exclusive voice shopping deals.

Google for Jobs is officially available in the US.

Anything that seems like a job-seeking search, Google will offer targeted job filtering.

Google takes you to a full job search interface if you tap on any of the new options. This makes the various filters easier to access, and you can refine your search. Many listings will also include reviews and ratings of the employer.

A container is a form of lightweight virtualization.

An application or process running in a container uses the operating system kernel and system resources, but each container is isolated from the operating system and from other containers, behaving as if it's running in a separate instance of the operating system.

All the apps you love on your phone are now available on your computer.

Samsung Chromebook Plus Convertible Touch Laptop is powerful, it's lightning fast, the hardware is terrific, the display is gorgeous, and it runs Android apps
Flexible 360° profile. Enables you to use upright as a computer to reply to emails or finish a paper and recline for a tablet view ideal for surfing and viewing
This Device comes with the pen out of the box. Power to personalize your communications by writing directly on screen.
Take notes, make a sketch, capture part of the screen, etc
Get things done using docs and apps in offline mode
Makes it easy to carry with you wherever the day takes you.

HTTPS preferred

Google Chrome flagging non-HTTPS sites as insecure, Apple requiring iOS apps' API communication to use HTTPS, and Google giving search ranking preference to HTTPS.

By going beyond last-click attribution for your Search ads in AdWords, you can understand your customer journey and make changes to improve your campaigns.

If you pick the right model and set the right bids against it, you can get more clicks that influence customers on their journey. Ultimately, the idea is to drive a higher volume of profitable conversions. Users take a while to make decisions; by changing your approach to attribution you can identify how your advertising affects people across all of their crucial, decision-making moments.

How To Add a Local ESXi User

You must directly log into the host with the vSphere Client to create ESXi users. Click the Local Users & Groups tab and click Users. Right-click anywhere in the Users table and click Add. Enter a login, a user name, and a password.

[HDGEM] How to improve search accuracy and ranking for your website.

Determine the URL structure of your web page.
Responsive design is most recommended.
Use rel='canonical' + rel='alternate' for separate desktop/mobile sites.
Use Vary HTTP header for a single URL dynamically serving separate desktop/mobile HTMLs.
Use noindex for pages you want to limit access to those who know the URL.
Use relevant authentication mechanism for pages you want to keep private.

--
Posted By Blogger to HDGEM at 6/20/2017 01:26:00 AM

[HDGEM] THAAD

THAAD is a mobile system capable of hitting ballistic missiles inside or outside the atmosphere in their final, or terminal, phase.

--
Posted By Blogger to HDGEM at 6/20/2017 12:32:00 AM

[HDGEM] AUTOMATING YOUR NETWORK WITH ANSIBLE IS EASY

Ansible's simple automation framework means that previously isolated network administrators can finally speak the same language of automation as the rest of the IT organization, extending the capabilities of Ansible to include native support for both legacy and open network infrastructure devices. Network devices and systems can now be included in an organization's overall automation strategy for a holistic approach to application workload management.

With Ansible, your network teams will:

Use the same simple, powerful, and agentless automation framework IT operations and development are already using
Use a data model (a playbook or role) that's separate from the execution layer (Ansible automation engine) that easily spans heterogeneous network hardware
Benefit from a wide variety of community and vendor-generated playbook and role content to help accelerate network automation projects

--
Posted By Blogger to HDGEM at 6/19/2017 03:49:00 PM

Selenium is a very powerful automation testing tool.

Selenium is a web based application testing tool. This tool can be widely used for compatibility, functional, regression and user acceptance testing. Open source toolSupport multiple programming language such as C#, JAVA, Perl etc.Work on different platform such as Linux, Mac OS and Windows.Pillar of supporting several browser (Chrome, Firefox, Internet Explorer, Safari etc.)

How to fix AWS cli unable to find credential

~/.aws/credentials
[default] aws_access_key_id=AKIAIOSFODNN7EXAMPLE aws_secret_access_key=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY~/.aws/config
[default] region=us-west-2 output=json The following settings are supported.
aws_access_key_id – AWS access key.
aws_secret_access_key – AWS secret key.
aws_session_token – AWS session token. A session token is only required if you are using temporary security credentials.
region – AWS region.
output – output format (json, text, or table)                    

[HDGEM] How to set Maven options MAVEN_OPTS in NetBeans

Right clicking on the project and setting an action with a property for Env.MAVEN_OPTS


For example: to ignore ssl certificate checking:

Env.MAVEN_OPTS=maven.wagon.http.ssl.insecure=true maven.wagon.http.ssl.allowall=true maven.wagon.http.ssl.ignore.validity.dates=true

--
Posted By Blogger to HDGEM at 6/19/2017 12:43:00 PM

How to find the name of the CD / DVD from command line on Linux

lsblk lists information about all available or the specified block
       devices.  The lsblk command reads the sysfs filesystem and udev db to
       gather information.

$ lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 931.5G 0 disk ├─sda1 8:1 0 915.6G 0 part / ├─sda2 8:2 0 1K 0 part └─sda5 8:5 0 15.9G 0 part [SWAP] sr0 11:0 1 464M 0 rom

[HDGEM] Necessary expenses

Necessary expenses are items such as transportation costs, shelter, living costs and any debt you're paying off. The rest goes into Other.

--
Posted By Blogger to HDGEM at 6/19/2017 01:50:00 AM

Why Go Language?

Because Go runs fast and its code is easy to read.  Go is a language of brevity and therefore fits well for the cloud and (micro)services.

[HDGEM] Email marketing software

Email marketing software allows you to broadcast a message to a large group of people and track live results such as open rate, click‑through rate, social shares and unsubscribes to name a few.

--
Posted By Blogger to HDGEM at 6/18/2017 01:32:00 AM

[HDGEM] WebExtensions is a cross-browser system for developing browser add-ons.

WebExtensions is a cross-browser system for developing browser add-ons. To a large extent the system is compatible with the extension APIsupported by Google Chrome and Opera. Extensions written for these browsers will in most cases run in Firefox or Microsoft Edge with just a few changes. The API is also fully compatible with multiprocess Firefox.

--
Posted By Blogger to HDGEM at 6/18/2017 12:42:00 AM