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,860 other subscribers

Archive for January, 2017

pi-hole/pi-hole: A black hole for Internet advertisements (designed for Raspberry Pi)

Posted by jpluimers on 2017/01/31

pi-hole – A black hole for Internet advertisements (designed for Raspberry Pi)

Works on most Debian distributions as well. Hopefully on opensuse one day as well.

Source: pi-hole/pi-hole: A black hole for Internet advertisements (designed for Raspberry Pi)

Not exactly the nicest way of installing though:

curl -L install.pi-hole.net | bash

Source: Pi-Hole: A Black Hole For Internet Advertisements

Source: In the past year, a similar threat has begun to emerge on mobile devices:…

Note that any ad-block mechanism needs curation to white/black list some stuff. But: who does that and who watches the curators?

Source: In the past year, a similar threat has begun to emerge on mobile devices: So-called overlay malware that impersonates login pages from popular apps and… – Jeroen Wiert Pluimers – Google+

via:

Some more links for when you get this going:

Changing hostname

As all raspbian hosts advertise their hostname as raspberrypi it is confusing to set them apart, so I changed the hostname in these files:

/etc/hostname
/etc/hosts
/etc/wicd/wired-settings.conf
/etc/wicd/wireless-settings.conf

Then rebooted (probably could have done sudo /etc/init.d/hostname.sh) to force the new hostname to be used everywhere.

DHCP versus static IP

Note that pi-hole by default converts the DHCP assigned address on eth0 to a static one. This makes it harder to use pi-hole in these situations:

  • preparing a pi-hole on network A and deploying it on network B
  • using pi-hole on a DHCP based network where the DHCP server hands out fixed IP addresses based on MAC

To get going I:

  1. filed an issue Work with DHCP address instead of static IP address configuration. · Issue #629 · pi-hole/pi-hole
  2. plugged in the Edimax EW-7811Un 150Mbps 11n Wi-Fi USB Adapter  which appeared as wlan0 in the ifconfig list
  3. failed in getting wicd-curses to work: it would only detect half of the WiFi networks that iwlist wlan0 scan detects.
  4. used the steps at Setting WiFi up via the command line – Raspberry Pi Documentation to get WLAN going:
    1. perform sudo iwlist wlan0 scan | grep ESSID scan to get a list of networks and their (E)SSID names
    2. append the below fragment to the end of /etc/wpa_supplicant/wpa_supplicant.conf and correct the value for ssid to the ESSID (keep the double quotes around it) and psk to the password for that ESSID (also keep the double quotes around it)
    3. performed sudo ifdown wlan0  and sudo fup wlan0 to force a WiFi connection refresh
    4. waited 30 seconds for a DHCP address to appear in ifconfig for wlan0
network={
    ssid="The_ESSID_from_earlier"
    psk="Your_wifi_password"
}

 

 

–jeroen

Read the rest of this entry »

Posted in *nix, bash, Development, Linux, openSuSE, Power User, Scripting, Software Development, SuSE Linux, Tumbleweed | 1 Comment »

Instantly convert curl commands to Go code: https://mholt.github.io/curl-to-go/

Posted by jpluimers on 2017/01/31

Instantly convert curl commands to Go code: curl-to-Go: Convert curl commands to Go code at https://mholt.github.io/curl-to-go/

via: Instantly convert curl commands to Go code: bit.ly/1PJprPV – nifty tool!

–jeroen

Posted in *nix, cURL, Development, Go (golang), Power User, Software Development | Leave a Comment »

March ‘Rosehill’  – Enfield Citadel Band – YouTube

Posted by jpluimers on 2017/01/30

Interesting piece of music: March ‘Rosehill’  – Enfield Citadel Band – YouTube

We’re going to play this as well.

–jeroen

Read the rest of this entry »

Posted in About, Adest Musica, Personal | Leave a Comment »

Reducing the size of your Windows.edb (Search) and DataStore.edb (Update) databases

Posted by jpluimers on 2017/01/30

Windows Search: Windows.edb

If you use Windows Search (I don’t: I use Everything by VoidTools), your Windows.edb can grow ridiculously large. It is a single file, though it appears to be in two places because there is a symbolic link from C:\Users\All Users to C:\ProgramData :

C:\ProgramData\Microsoft\Search\Data\Applications\Windows\Windows.edb
C:\Users\All Users\Microsoft\Search\Data\Applications\Windows\Windows.edb

This is how to reduce its size:

How to offline defrag the index

  1. Change the Windows Search service so that it does not automatically start. To do this, run the following command in cmd.exe:
    sc config wsearch start= disabled
  2. Run the following command to stop the Windows Search service:
    net stop wsearch
  3. Run the following command to perform offline compaction of the Windows.edb file:
    esentutl.exe /d %AllUsersProfile%\Microsoft\Search\Data\Applications\Windows\Windows.edb
  4. Run the following command to change the Windows Search service to delayed start:
    sc config wsearch start= delayed-auto
  5. Run the following command to start the service:
    net start wsearch

Notes:

  1. I did not perform the last 2 steps as I’ve kept Windows Search disabled.
  2. If you want to reduce the size of the C:\ProgramData\Microsoft\Search\Data\Applications\Windows\Projects\SystemIndex\Indexer\CiFiles\ directory:
    1. Before step 1, choose what kind of Windows Search indexing options you want
    2. Between step 3 and 4, delete the directory

Windows Update: DataStore.edb

Windows Update uses the same database structure and is a single file:

C:\Windows\SoftwareDistribution\DataStore\DataStore.edb

This is how I reduced its size:

net stop wuauserv
net stop bits
esentutl.exe /d C:\Windows\SoftwareDistribution\DataStore\DataStore.edb
net start bits
net start wuauserv

Talking about Windows Update: you might also want to Clean Up the WinSxS Folder

–jeroen

Read the rest of this entry »

Posted in Everything by VoidTools, Power User, Windows, Windows 10, Windows 7, Windows 8, Windows 8.1, Windows 9, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Windows Vista | Leave a Comment »

DIY pick and place machine from parts of scanner, inkjet printer, DVD player and vaccuum pump – Open Theremin – Urs Gaudenz

Posted by jpluimers on 2017/01/30

Urs Gaudenz manufactures Open.Theremin kits using his do it yourself pick and place machine which he built from low cost scanner, ink jet printer, DVD player mechanics and some Arduino controlling. Even his solder oven is Arduino controlled!

This is months of work showing a work flow in a 11 minute youtube video. Well done!

via:

Video:

Read the rest of this entry »

Posted in Arduino, Development, Geeky, Hardware Development | Leave a Comment »

apache links for log formats, log kinds, etc

Posted by jpluimers on 2017/01/27

Am I the only one who thinks Apache logging configuration is a mess? Especially when you look at the templates shipping with various *nix distros?

Files like vhost-ssl.template and vhost.template using different ways of logging for the same thing make me cringe. This apart from ordering of configuration between the files being different, some lines doing tab-indent and others doing space-indent and non-matching spaces-per-tab settings between the files.

The apache wiki examples have different issues.

How can you expect mere mortals getting vhost configuration right when the provided templates are so bad?

Given the move towards SSL/TLS, mortals like me won’t easily get it right either.

A few things I think that should be done:

  • For vhosts, standardise on vhost_combined, not  combined.
  • Favour CustomLog over TransferLog.
  • Make a choice: either log in a Catch All log file, or put each vhost log in different files (now it’s different for the SSL and normal template).
  • If using separate log files per vhost, then include a vhost reference in the log filenames.
  • Add a vhost_ssl_combined in addition to ssl_combined.
  • Document ErrorLog in the same place as CustomLog and TransferLog.
  • Provide templates for combining regular and SSL vhost configs which currently is hard.
  • Make timestamps in logging formats the same. They are different between ssl_combined and the others. Don’t you hate that? What happened to ISO-8601?

–jeroen

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

Multiple wifi access points / seamless handoff – Spiceworks

Posted by jpluimers on 2017/01/27

These seem to be the brands to look into:

  • Ubiquiti
  • Meraki
  • Ruckus

Source: Multiple wifi access points / seamless handoff – Spiceworks

–jeroen

Posted in Internet, Power User, Ubiquiti, WiFi | Leave a Comment »

inversepath/usbarmory: USB armory: open source flash-drive-sized computer

Posted by jpluimers on 2017/01/26

Source: Inverse Path - USB armory

Source: Inverse Path – USB armory

usbarmory – USB armory: open source flash-drive-sized computer

Roughly EUR 100 excluding, SD card, host adapter and enclousure.

Source: inversepath/usbarmory: USB armory: open source flash-drive-sized computer

Since I was talking about security anyway…. this is a nice toy for breaking open laptops or desktops when the administrator forbade the installation of software, or you want software on it executed. This is often the case with company devices, e.g. the laptops which are supplied by banks to their 3rd party suppliers. Outsourcing is cool, remember?

This is a computer on a stick which can run a Linux kernel. In combination with some USB gadget kernel modules, it can be configured to authenticate itself as any device. All you need to do is plug it in, and iterate by brute force through the device identifiers until you hit one which is accepted to be used. Store the statically linked software you want to install or run on the stick beforehand, and here you go. So if you ever need a SSH client on a “secure” Windows laptop… putty.exe FTW.

Posted by Ralf Ramge – Google+

–jeroen

via: Since I was talking about security anyway…. this is a nice toy for breaking open laptops or desktops when the administrator forbade the installation of… – Kristian Köhntopp – Google+

Posted in *nix, Hardware, Pen Testing, Power User, Security, USB | Leave a Comment »

fixing a Mac home `brew update` that has permission errors (after that I could install plantuml)

Posted by jpluimers on 2017/01/26

I had this occurring on my system:

RetinaMBPro1TB:~ jeroenp$ brew update
error: unable to unlink old 'Library/ENV/pkgconfig/10.11/libcurl.pc' (Permission denied)
error: unable to unlink old 'Library/ENV/pkgconfig/10.11/libxml-2.0.pc' (Permission denied)
error: unable to unlink old 'Library/ENV/pkgconfig/10.11/sqlite3.pc' (Permission denied)
To restore the stashed changes to /usr/local run:
  'cd /usr/local && git stash pop'
Already up-to-date.

This is how I solved it:

RetinaMBPro1TB:~ jeroenp$ ls -al /usr/local | grep -w Library
drwxr-xr-x+ 11 jeroenp  admin   374 Mar  9 19:33 Library
RetinaMBPro1TB:~ jeroenp$ sudo chown -R $USER /usr/local/Library/
Password:
RetinaMBPro1TB:~ jeroenp$ brew update
To restore the stashed changes to /usr/local run:
  'cd /usr/local && git stash pop'
Updated Homebrew from d32996d to 638d755.
==> New Formulae
...
==> Updated Formulae
...
==> Renamed Formulae
...
==> Deleted Formulae
...
RetinaMBPro1TB:~ jeroenp$ 

The above solution is based on major python problems · Issue #48301 · Homebrew/homebrew

After that, I could install plantuml (which requires java, just so you know) so now I can create SVGs from it locally:

plantuml -tsvg PSO.network-diagram.PlantUML.txt

Note I had to edit the formula so it installs plantuml-8037 or higher (the git version back then installed plantuml-8031) as it fixed a namespace bug. Since plantuml releases often, be prepared to do some version fiddling.

–jeroen

Posted in *nix, *nix-tools, Apple, Development, Diagram, Home brew / homebrew, Java, Java Platform, Mac, Mac OS X / OS X / MacOS, Mac OS X 10.5 Leopard, Mac OS X 10.6 Snow Leopard, MacBook, MacBook Retina, MacBook-Air, MacBook-Pro, MacMini, OS X 10.10 Yosemite, OS X 10.8 Mountain Lion, OS X 10.9 Mavericks, PlantUML, Power User, Software Development, UML | Leave a Comment »

QCon London 2017 | Software Development Conference

Posted by jpluimers on 2017/01/26

Need to check this out:

Register now for QCon London, a practitioner-driven conference designed for team leads, architects and project management, that tracks innovation in enterprise software.

Source: QCon London 2017 | Software Development Conference

Posted in Conferences, Development, Event, Software Development | Leave a Comment »