The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,839 other subscribers

Archive for the ‘Power User’ Category

Old Google Charting API: tools for still using them

Posted by jpluimers on 2016/11/10

While mocking the ScaleMM documentation, I bumped into a chart that I thought was an image, but is in fact generated by the (now deprecated) Image Charts API from Google.

In fact it is generated on the fly from a URL: http://chart.apis.google.com/chart?chxr=0,0,16|1,0,14682…&nonsense=something_that_ends_with.png

Compare the two below. They are identical (:

Static ScaleMM1 comparison chart

Static ScaleMM1 comparison chart

URL based ScaleMM1 comparison chart

URL based ScaleMM1 comparison chart

Even though the API is deprecated Google has no plans to turn it of, so it still works and is the easiest way to get charts into a Markdown or reStructuredText document.

In practice, it doesn’t matter if you use the chart.apis.google.com or chart.googleapis.com domain: they give the same results the same.

As I wanted to convert the results.txt to a chart, I dissected the above URL, looked up the definitions of the URL parameters (the trickiest: cds for lxy graphs and the combination of chds and chxr, easier: chls) and created a new URL for the chart below.

Read the rest of this entry »

Posted in Delphi, Development, Google, Power User, Software Development | Leave a Comment »

parted “Error: Can’t have a partition outside the disk!” sometimes means you’ve a bogus DVD inserted

Posted by jpluimers on 2016/11/07

At first sight I thought I had a damaged partition table on the HDD, but then I realised it was a bogus DVD.

parted -l would give me this:

Error: Can't have a partition outside the disk!
Ignore/Cancel? i                                                          
Error: Can't have a partition outside the disk!
Ignore/Cancel? i                                                          
Model: NECVMWar VMware IDE CDR10 (scsi)
Disk /dev/sr0: 4647MB
Sector size (logical/physical): 2048B/2048B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
 1      7340kB  23.9MB  16.5MB  primary               esp, type=ef
 2      23.9MB  18.6GB  18.6GB  primary               boot, hidden, type=17

A simple eject /dev/sr0 solved the issue.

Too bad there is no way to force parted to ignore errors (or specify a default answer).

–jeroen

Posted in *nix, *nix-tools, Linux, openSuSE, Power User, SuSE Linux, Tumbleweed | Leave a Comment »

Kerlink IoT station page | LoRa | Semtech

Posted by jpluimers on 2016/11/07

This can be used for TheThingsNetwork.org.

Some downloads:

Attachments
File Last modified Size
Kerlink_gateway_channel_setup_v0.2.pdf 2015-05-18 17:20 838Kb
Kerlink_gateway_installation_R7.pdf 2015-08-13 14:32 805Kb
Python_gateway_spectrum_display.zip 2015-04-09 15:54 10Kb
kerlink_IoT_LoRa_update.zip 2015-08-13 14:27 63Kb
kerlink_IoT_LoRa_update_DHCP.zip 2015-08-13 14:27 64Kb

Source: Kerlink IoT station page | LoRa | Semtech

Posted in *nix, IoT Internet of Things, LoRa - Long Range wireless communications network, Network-and-equipment, Power User, Uncategorized | Leave a Comment »

How to use curl command with http/2 on MacOS X

Posted by jpluimers on 2016/11/04

Skip the built-in curl and directly go to the homebrew one:

$ brew update
$ brew upgrade
$ brew install curl --with-nghttp2

Source: How to use curl command with http/2 on MacOS X [WayBack]

via: Using cURL with HTTP/2 on Mac OS X #sysadmin #unix #apple #macos – Joe C. Hecht – Google+ [WayBack]

–jeroen

Posted in Apple, Home brew / homebrew, Mac, Mac OS X / OS X / MacOS, MacBook, MacBook Retina, MacBook-Air, MacBook-Pro, MacMini, macOS 10.12 Sierra, OS X 10.9 Mavericks, Power User | Leave a Comment »

What runs logrotate in OpenSUSE 13.2?

Posted by jpluimers on 2016/11/04

Historically, on many systems, logrotate is being ran from a daily cron job. Many tutorials still presume that, for instance HowTo: The Ultimate Logrotate Command Tutorial with 10 Examples.

I still thought it would and after writing On OpenSuSE, when adding Apache vhosts with their own log files don’t forget to update your logrotate configuration I was anxious to see when logrotate would run the second time.

So I tried finding it in the cron.daily and it wasn’t there.

OpenSuSE 13.2 changed how logrotate is inficated: from there on (including both Tumbleweed and LEAP) logrotate is ran from the systemd service:

logrotate is a systemd service in 13.2 (/usr/lib/systemd/system/logrotate.service) and it is run periodically by a systemd timer (not cron).

Have a look at /usr/lib/systemd/system/logrotate.timer and “man systemd.timer”.

You can view the status of the logrotate.timer that fires it every day:

systemctl status logrotate.timer

It triggers logrotate and reads the config in /etc/logrotate.conf for basic global settings and then files in /etc/logrotate.d/* for custom settings for specific files.

Which means you should not mess around with files in /etc/logrotate.d/ as each file there will be processed. So don’t leave around backup files ending in a tilde (~) or DEADJOE as it causes trouble:

Jul 07 00:00:02 revue logrotate[16121]: error: DEADJOE:5 lines must begin with a keyword or a filename (possibly in double quotes)
Jul 07 00:00:02 revue logrotate[16121]: error: DEADJOE:6 missing '{' after log files definition
Jul 07 00:00:02 revue logrotate[16121]: error: found error in file DEADJOE, skipping

There’s more you can do do debug logrotate behaviour

The below tips are all based on this thread: [Bug 913421] logrotate not running after update from 13.1 to 13.2

Show if the timer is there and counting:

# systemctl list-timers --all
NEXT                          LEFT          LAST                          PASSED    UNIT                         ACTIVATES
Fri 2016-07-08 00:00:00 CEST  5h 24min left Thu 2016-07-07 00:00:02 CEST  18h ago   logrotate.timer              logrotate.service
Fri 2016-07-08 17:51:53 CEST  23h left      Thu 2016-07-07 17:51:53 CEST  43min ago systemd-tmpfiles-clean.timer systemd-tmpfiles-clean.service

2 timers listed.

Show the status of the logrotate service itself:

# systemctl status logrotate.service --full
● logrotate.service - Rotate log files
   Loaded: loaded (/usr/lib/systemd/system/logrotate.service; static; vendor preset: disabled)
   Active: failed (Result: exit-code) since Thu 2016-07-07 00:00:02 CEST; 18h ago
     Docs: man:logrotate(8)
           man:logrotate.conf(5)
  Process: 16121 ExecStart=/usr/sbin/logrotate /etc/logrotate.conf (code=exited, status=1/FAILURE)
 Main PID: 16121 (code=exited, status=1/FAILURE)

Jul 07 00:00:02 revue logrotate[16121]: error: DEADJOE:5 lines must begin with a keyword or a filename (possibly in double quotes)
Jul 07 00:00:02 revue logrotate[16121]: error: DEADJOE:6 missing '{' after log files definition
Jul 07 00:00:02 revue logrotate[16121]: error: found error in file DEADJOE, skipping
Jul 07 00:00:02 revue logrotate[16121]: error: skipping "/var/log/squidGuard/squidGuard.log" because parent directory has insecure permissions (It's world writable or writable by group which is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation.
Jul 07 00:00:02 revue logrotate[16121]: compress_ext is /usr/bin/xz
Jul 07 00:00:02 revue logrotate[16121]: compress_ext was changed to .xz
Jul 07 00:00:02 revue systemd[1]: logrotate.service: Main process exited, code=exited, status=1/FAILURE
Jul 07 00:00:02 revue systemd[1]: Failed to start Rotate log files.
Jul 07 00:00:02 revue systemd[1]: logrotate.service: Unit entered failed state.
Jul 07 00:00:02 revue systemd[1]: logrotate.service: Failed with result 'exit-code'.

The bottom lines are from journalctl -u logrotate which can show more information.

In this case, fixing both issues was easy: remove DEADJOE and correct the permissions on this empty directory:

# ls -al /var/log/squidGuard/
total 0
drwxrwx--- 1 squid squid   0 Jun 16 21:08 .
drwxr-xr-x 1 root  root  962 Jul  6 17:36 ..
# chmod 750 /var/log/squidGuard/
# ls -al /var/log/squidGuard/
total 0
drwxr-x--- 1 squid squid   0 Jun 16 21:08 .
drwxr-xr-x 1 root  root  962 Jul  6 17:36 ..

If you can’t wait for the timer to fire at midnight, you can invoke the logrotate service manually (after that wait until it is finished then do something like du -csh /var/log/* or list the files):

# systemctl start logrotate.service

–jeroen

via:

Posted in *nix, Linux, logrotate, openSuSE, Power User, SuSE Linux, Tumbleweed | Leave a Comment »

Fritz!Box 7490 with fiber connection, routing anonymous/withheld ISDN calls to a new answering machine

Posted by jpluimers on 2016/11/04

I got a bit fed-up with truckloads of anonymous calls. 95% of these are from sales persons. The others from organisations shielding their phone numbers. Too bad for the latter: if they want to stay anonymous, they’re not worth dealing with.

My original setup was incoming ISDN connected through a Gigaset DX600A with a bunch of DECT handsets, but there you need to configure each handheld device and the Gigaset base station itself to skip anonymous incoming calls.

One of my fiber connections at home goes through a Fritz!Box 7490 which has a connector to provide an internal ISDN S0 bus. I discovered – though not advertised in the German or English manual – that you can hook it to external ISDN even though it is not connected to external DSL but external fiber to the home (FTTH).

A note first: the the Fritz!Box 7490 has built-in resistors to terminate the S0 bus, so it can only be on one side of the S0 bus. The other far end of the S0 bus needs to be terminated too.

Steps to hook up ISDN on both incoming and outgoing S0 bus:

  1. Fritz!Box Y-Cable for connecting PSTN or ISDN (and optionally DSL) to your modem.

    Fritz!Box Y-Cable for connecting PSTN or ISDN (and optionally DSL) to your modem.

    Put the long end of the Y-cable ** into the DSL/TEL connection of the Fritz!Box.
    The long end is usually labelled DSL/TEL.

  2. Put the black small end into your ISDN NT1 (sometimes called ISDN NTBA).
    The black small end is usually labelled TEL.
  3. Leave the grey small end disconnected. It is usually called DSL. Since I’m using FTTH, no DSL for me.
  4. Connect the chain of other ISDN devices (and the terminator) to the FON S0 connector on the Fritz!Box **.
  5. Test if your original equipment still works.

Configuring your Fritz!Box to use ISDN MSNs:

  1. Logon as administrator to your Fritz!Box.
  2. In the menu on the left, click on “Telephony”, then on “Telephone Numbers”.
  3. A new View appears, where you click on the “Line Settings” tab.
  4. Ensure “Landline network enabled” is enabled, then click on “Apply” and wait for the changes to be saved.
  5. In the menu on the left, click on “Telephony”, then on “Telephone Numbers”.
  6. Click on “New Telephone Number”, then follow the steps in the wizard:
    1. Choose “Configure landline number”, click “Next”
    2. Choose “multiple landline numbers (ISDN line)”, click “Next”
    3. Add the MSN numbers you will use in your Fritz!Box each in a separate entry, then click “Next”
    4. Click “Next” to save the settings.
  7. Configure any devices you need to connect to the MSN numbers you entered.

Setting up the diversion of Anonymous calls to an Answering Machine:

  1. Finally I set-up an answering machine for anonymous call forwarding:
    Automatically diverting anonymous calls to the internal answering machine | FRITZ!Box 7490 | AVM International.

    • Note that here you can divert all anonymous calls to “all numbers”, but not divert all anonymous calls to “Landline Network”. I think this is a bug in FRITZ!OS 6.20.
  2. And (since the Fritz!Box already has some VOIP numbers configured), I also added the GigaSet as an ISDN PBX to the Fritz!Box:
    1. In the menu on the left, click on “Telephony”, then on “Telephone Devices”.
    2. Choose “Configure New Device”, then follow the Wizard Steps:
      1. Choose “ISDN PBX”, click “Next”
      2. Note the MSNs the Fritz!Box shows (they should include both the ISDN MSNs and VOIP numbers), then click “Next”.
      3. Verify the ISDN PBX (the GigaSet) is on the FON S0 port, then click Apply to confirm.
    3. In the menu on the left, click on “Telephony”, then on “Telephone Devices”.
    4. Choose “Edit” for the “ISDN PBX” connected to “FON S0”.
    5. Verify the “Main Phone Number” is correct (choose either an ISDN MSN or VOIP number).
    6. Then I configured the extra VOIP numbers as MSNs in the GigaSet.

–jeroen

** Larger images.

Read the rest of this entry »

Posted in DECT, Gigaset, ISDN, Power User, PSTN, Telephony | Leave a Comment »

If you have enough Chrome Google related tabs open, Google will DoS G+ for you

Posted by jpluimers on 2016/11/03

I very often see the captcha. Today Google managed to DoS G+.

It happened right after RDP-ing into my work machine that has like ~100 research related tabs open of which about half are Google hosted pages.

G+ wouldn’t work as those tabs send so many G+ requests that Google effectively did a DoS on G+ for my IP-address and user (switching to another user was fine).

Google doing a DoS on G+ because all the open tabs generate G+ traffic

Google doing a DoS on G+ because all the open tabs generate G+ traffic

Later this got simplfied into this:

–jeroen

Posted in Chrome, G+: GooglePlus, Google, Power User, SocialMedia | Leave a Comment »

Just blocked 95.131.[184|185|186|190|191].0/24 on my firewall because suspicious port scanning @WillHillBet

Posted by jpluimers on 2016/11/02

I just blocked these IP subnets on my routers:

  • 95.131.184.0/24
  • 95.131.185.0/24
  • 95.131.186.0/24
  • 95.131.190.0/24
  • 95.131.191.0/24

Within a day they managed to get 60+ IP addresses from these subnets into my port-scanner blacklists because of suspicious port scanning activities.

They mostly belong to Whg (International) Limited, Gibraltar and Whg (International) Limited, United Kingdom  which seem to be related to William Hill Organization Ltd, United Kingdom that I just blocked before.

If the situation continues I’m going to block the 95.131.184.0/26 superblock as well:

–jeroen

Continuation of Just blocked 141.138.130.0/24 and 141.138.131/24 on my firewall because suspicious port scanning @WillHillBet « The Wiert Corner – irregular stream of stuff

Posted in Internet, Network-and-equipment, Power User | Leave a Comment »

Just blocked 141.138.130.0/24 and 141.138.131/24 on my firewall because suspicious port scanning @WillHillBet

Posted by jpluimers on 2016/11/02

I just blocked these IP subnets on my routers:

  • 141.138.130.0/24
  • 141.138.131.0/24

Within a day they managed to get 80+ IP addresses from these subnets into my port-scanner blacklists because of suspicious port scanning activities.

They all belong to William Hill Organization Ltd, United Kingdom.

If the situation continues I’m going to block the superblock as well:

–jeroen

Posted in Network-and-equipment, Power User | 5 Comments »

Topic: [Resolved] Sharing on Google Plus Private..? Why? « WordPress.org Forums

Posted by jpluimers on 2016/11/01

The below is even more convoluted when you have ad-blockers installed: then the G+ integration won’t even appear and the behaviour differs between classic G+ and current G+.

So here are the steps:

  1. Remove the WordPress link from https://security.google.com/settings/security/permissions
  2. In your blog settings (for me that’s https://wordpress.com/sharing/wiert.me) remove the G+ integration; do this in a Chrome incognito Window if the G+ integration is not visible
  3. At the same page re-add your G+ integration and follow further steps at https://jetpack.com/support/publicize/google/#reconnecting

Modern G+ settings at https://plus.google.com/settings does not have the above permissions integration link but classic G+ at https://plus.google.com/settings?gmbpt=true&fd=1 does.

via:

Hi there,

I have good news!

A few weeks ago, Google+ made some changes to their API. In doing so introduced some issues with Publicize. The module still worked, but the updates posted by the WordPress app on your Google+ Profile or Google+ Page were only visible to you.

In the past few weeks, we’ve worked with Google+ to start using a new API. That API works just like the old one, with one exception: publicized posts are now public. You can’t change the visibility of publicized posts to “My Circles”, or anything else.

If you’re happy to have Publicize publishing public posts to your Google+ Profile or Page, you can follow the instructions below to delete your old connection, and then reconnect your Jetpack site to your Google+ account:
https://jetpack.com/support/publicize/google/#reconnecting

I hope this helps.

Source: Topic: [Resolved] Sharing on Google Plus Private..? Why? « WordPress.org Forums

Posted in G+: GooglePlus, Power User, SocialMedia, WordPress | Leave a Comment »