MoonPoint Support Logo

 


Shop Amazon Warehouse Deals - Deep Discounts on Open-box and Used ProductsAmazon Warehouse Deals



Advanced Search
November
Sun Mon Tue Wed Thu Fri Sat
     
19 20 21 22 23 24 25
26 27 28 29 30    
2017
Months
NovDec


Fri, Nov 17, 2017 9:25 pm

Removing all lines containing a string in vi

To remove all lines containing a particular string in vi or the Vim text editors, you can use the g command to globally search for the specified string and then, by putting a "d" at the end of the command line, specify that you want all lines containing the specified string deleted. E.g., If I wanted to remove all lines containing the string "dog", I could use the following command.

:g/dog/d

That command would also remove any lines containing "dogs", "dogged", etc. If I just wanted to remove lines containing "dog", I could use :g/dog /d.

You can, of course, specify the pattern on which you wish to search using regular expressions. E.g., if I wanted to remove any lines containing either "dog" or "hog", I could use the command below.

g/[dh]og/d

By putting the leters "d" and "h" within brackets, I indicate to vi that it should remove any line that has either a "d" or an "h" followed by "og".

[ More Info ]

[/software/editors/vi] permanent link

Mon, Nov 13, 2017 11:20 pm

Limit number of records displayed in SQL output

If you have a lot of records in a table in a MySQL, MariaDB, etc. database that are returned when you use the SQL SELECT command to query for matching records, the results may scroll by so that you can't see the initially returned rows. You can limit the number of rows displayed by appending LIMIT n at the end of the command where n is the number of records you want to see at a time. E.g., if I had 100 records in a table named Sales, but wanted to page through them 10 records at a time, I could use SELECT * FROM Sales LIMIT 10; or, if I just wanted to view one field/column in the table, e.g. "Description", I could use SELECT Description FROM Sales LIMIT 10;

[/software/database/sql] permanent link

Sun, Nov 12, 2017 7:46 pm

Manually synchronizing time on a Microsoft Windows system

I noticed the time on a Microsoft Windows 7 Professional system was ahead of the actual time by 22 minutes. The system was part of a Windows domain, but the domain controller (DC) was decommissioned. I checked the Network Time Protocol (NTP) settings from a command-line interface (CLI) by opening a command prompt window with administrator level access and using the Microsoft Windows w32tm command. to check the current configuration for querying time servers.

C:\>w32tm /query /peers
#Peers: 1

Peer:
State: Pending
Time Remaining: 1441.6885058s
Mode: 0 (reserved)
Stratum: 0 (unspecified)
PeerPoll Interval: 0 (unspecified)
HostPoll Interval: 0 (unspecified)

C:\>w32tm /query /status
Leap Indicator: 3(last minute has 61 seconds)
Stratum: 0 (unspecified)
Precision: -6 (15.625ms per tick)
Root Delay: 0.0000000s
Root Dispersion: 0.0000000s
ReferenceId: 0x00000000 (unspecified)
Last Successful Sync Time: unspecified
Source: Free-running System Clock
Poll Interval: 10 (1024s)


C:>

[ More Info ]

[/network/ntp] permanent link

Sat, Nov 11, 2017 10:31 pm

Configuring a VPN connection on Windows 7

To set up a Windows 7 system to use Internet Key Exchange version 2 (IKEv2) for establishing a virtual private network (VPN) connection, take the following steps:
  1. Click on the Windows Start button at the lower, left-hand corner of the screen, or tap the Windows key on the keyboard and select Control Panel.
  2. From the Control Panel, click on Network and Internet
  3. Click on Network and Sharing Center.
  4. Click on Set up a new connection or network.
  5. Click on Connect to a workplace at the "Choose a connection option" window.
  6. At the Connect to a Workplace window, click on Use my Internet connection (VPN).
  7. At the next window you will see "Type the Internet address to connect to". Type the fully qualified domain name (FQDN) or IP address for the VPN provider, e.g., example.com, in the Internet address field. The default destination name is "VPN Connection," but you can change it if you wish to reflect the particular VPN provider, e.g., "Ajax VPN Connection". Check the check box next to "Don't connect now; just set it up so I can connect later" and then click on the Next button. Note: if you don't have a VPN service already, Hide.me offers a free VPN service you can use for testing, though it has more limited features and geographical locations than the Hide.me paid service. 1x1 px
  8. At the next window, you can provide the user name and password for the VPN account. If you don't want to have to provide those each time you establish the VPN connection, check the check box next to "Remember this password" then click on Create.
  9. When you see "The connection is ready to use," click on the Close button rather than Connect now.
  10. Then back at the Network and Sharing Center window, you can click on Connect to a Network and select the VPN connection. Or you can click on Change adapter settings which will show you the available network connections. You will need to be already connected to the Internet via a wired or wireless connection to establish a connection to the VPN. You can then double-click on the VPN connection entry in the list. You should see "WAN Miniport (IKEv2)" on that entry. If you need to make any changes to the settings, you can right-click on the relevant VPN connection and choose Properties.
  11. A window will open with fields for the user name and password for the domain. If you chose to save those values previously, you can simply click on Connect at this point to establish the VPN connection.

[ More Info ]

[/os/windows/win7] permanent link

Fri, Nov 10, 2017 5:19 pm

Removing a site's cookies in Google Chrome 62

To remove cookies for a specific site in Google Chrome version 62, take the following steps:

  1. Put chrome://settings/siteData in the Chrome address bar where you normally place URLs which will show you a list of all the cookies stored on the system.
  2. In the "Search cookies" field, type the relevant domain name, e.g., mattel.com; you will then see only the cookies for that particular domain.
  3. Click on "REMOVE ALL SHOWN" to remove all of the cookies for the domain. You will then be warned "This will delete any data stored on your device for all the sites shown. Do you want to continue?" Click on the "CLEAR ALL" button to delete all of the cookies for the domain.

You can also go directly to the list of all the cookies associated with a particular domain by putting chrome://settings/cookies/detail?site= followed by the domain name in the address bar, e.g., chrome://settings/cookies/detail?site=mattel.com. You can then click on "REMOVE ALL" to delete all of the listed cookies for the domain.

Note: Tested with Google Chrome Version 62.0.3202.89 (Official Build) (32-bit) on a system running Microsoft Windows 7 Professional.

[ More Info ]

[/network/web/browser/chrome] permanent link

Once You Know, You Newegg AliExpress by Alibaba.com

Shop Amazon Local - Subscribe to Deals in Your Neighborhood

Valid HTML 4.01 Transitional

Privacy Policy   Contact

Blosxom logo