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

Archive for the ‘*nix’ Category

some more lsof, netstat and rpcinfo examples

Posted by jpluimers on 2016/03/07

Last friday I updated the examples at *nix networking – lsof: How to tell what process has a specific port open on Linux (via: Server Fault) as I needed to document some of the machines around here (so it becomes easier replacing them).

I also added some links to background information and (when I get to using it: OS X still goes without) a good iproute2 starter page.

–jeroen

Posted in *nix, *nix-tools, Apple, Communications Development, Cygwin, Development, Internet protocol suite, Linux, Mac, Mac OS X / OS X / MacOS, 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, Power User, TCP | Leave a Comment »

rsync as diff – compare files in two directory on remote server using unix – Stack Overflow

Posted by jpluimers on 2016/03/01

Too bad the accepted answer forgets about deleted files.

Use one of these to compare (but not sync) two directory trees.

For size-only comparision:

rsync -n -avr --size-only --delete /abc/home/sample1/ server2:/abc/home/sample2/

If you want to compare both contents and size:

rsync -n -avrc --delete /abc/home/sample1/ server2:/abc/home/sample2/

–jeroen

via: diff – compare files in two directory on remote server using unix – Stack Overflow.

Posted in *nix, bash, Development, Power User, rsync, Scripting, Software Development | Leave a Comment »

Replace Boxee by Raspberry Pi as most TV support doing video+USB keybard over HDMI

Posted by jpluimers on 2016/02/22

If for instance your Boxee gets old or breaks down, you can use a Raspberry Pi as a replacement with Kodi as media player.

This combination will understand the Video+USB over HDMI which most TV supports officially named HDMI-CEC , but most vendors “invented” their own names (see list below).

The core is the kodi support for CEC.

Basically it comes down to using three cables going to the Pi: Power from TV (or some other source), HDMI to TV, and wired Ethernet. And a distribution for RaspberryPi containing kodi will work, for instance from OpenELEC Mediacenter – Download: Raspberry Pi Builds

Chad MILLER has more details on how to get this to work: My Boxee box is getting old, but I knew of no replacements. The problem is I …

Names known for HDMI-CEC via Wikipedia:

Anynet+ (Samsung), Aquos Link (Sharp), BRAVIA Link and BRAVIA Sync (Sony), HDMI-CEC (Hitachi), E-link (AOC), Kuro Link (Pioneer), INlink (Insignia), CE-Link and Regza Link (Toshiba), RIHD (Remote Interactive over HDMI) (Onkyo), RuncoLink (Runco International), SimpLink (LG), T-Link (ITT), HDAVI Control, EZ-Sync, VIERA Link (Panasonic), EasyLink (Philips), and NetCommand for HDMI (Mitsubishi).

Because of the naming, turning on CEC can be confusing: How to Enable HDMI-CEC on Your TV, and Why You Should

–jeroen

Posted in *nix, *nix-tools, Development, Hardware Development, Hardware Interfacing, HDMI, Linux, Power User, Raspberry Pi | Leave a Comment »

really cool playback tool for showing step by step stuff in terminals. …

Posted by jpluimers on 2016/02/05

Interesting:

Simon Wicki originally shared: really cool playback tool for showing step by step stuff in terminals. http://showterm.io

–jeroen

via: really cool playback tool for showing step by step stuff in terminals. ….

showterm

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

Building and running upc_keys.c on Mac OS X

Posted by jpluimers on 2016/01/27

Even after the SpeedTouch password algorithms were disclosed 2008, ISPs keep using weak algorithms to generate their default WPA/WPA2 passwords in their routers:

A short while ago, blasty published code to generate the WPA2 passwords for UPC routers. Even though Ziggo now owns UPC, a lot of  this UPC equipment is still in use. I guess it won’t be for long that similar code for Ziggo routers will be published too.

The code at https://haxx.in/upc_keys.c is easy to download, build and run on a Mac OS X machine even when you don’t have Xcode installed (use the “xcode-select –install” trick):

wget https://haxx.in/upc_keys.c
gcc -O2 -o upc_keys upc_keys.c -lcrypto
./upc_keys UPC0053284 5
./upc_keys UPC0053284 24

–jeroen

Posted in *nix, *nix-tools, Apple, C, Development, gcc, Mac, Mac OS X / OS X / MacOS, MacBook, MacBook Retina, MacBook-Air, MacBook-Pro, MacMini, OS X 10.10 Yosemite, Power User, Software Development | Leave a Comment »

dig show only the answer section: specify both +noall and +answer – via: Server Fault

Posted by jpluimers on 2016/01/25

The solution: add both the +noall and +answer flags before the query.

dig +noall +answer google.de

–jeroen

via dig show only answer – Server Fault.

Posted in *nix, *nix-tools, Apple, Linux, Mac, Mac OS X / OS X / MacOS, Mac OS X 10.4 Tiger, Mac OS X 10.6 Snow Leopard, Mac OS X 10.7 Lion, OS X 10.10 Yosemite, OS X 10.8 Mountain Lion, Power User, SuSE Linux | Leave a Comment »

Getting your public IP address from the command-line

Posted by jpluimers on 2016/01/13

Many sites giving your public IP address return a web page with a bloat of html. From the command-line, you are usually only interested in the IP-address itself. Few services return exactly that.

Below are command-line examples to provide the public IP address mostly from a *nix perspective. Usually you can get similar commands to work with Windows binaries for wget and Windows binaries for curl.

In the end, I’ve opted for commands in this format, as I think akamai will last longer than the other sites (but does not include an end-of-line in the http result hence the echo on Mac/*nix):

I’ve not tried aria2 yet, but might provide commands for that in the future.

These are the Linux permutations for akamai:

curl whatismyip.akamai.com && echo
curl ipv4.whatismyip.akamai.com && echo
curl ipv6.whatismyip.akamai.com && echo
curl ipv4.whatismyip.akamai.com && echo && curl ipv6.whatismyip.akamai.com && echo

The last two are convenient when you have both IPv4 and IPv6 configured on “the outside”.

You can replace curl with wget -q -O – (which outputs to stdout) for each command. You can even ommit the http:// (as that is the default protocol for both curl and wget).

Read the rest of this entry »

Posted in *nix, *nix-tools, Apple, bash, bash, Batch-Files, cURL, Development, Linux, Mac, Mac OS X / OS X / MacOS, Mac OS X 10.4 Tiger, Mac OS X 10.5 Leopard, Mac OS X 10.6 Snow Leopard, Mac OS X 10.7 Lion, MacBook, MacBook Retina, MacBook-Air, MacBook-Pro, MacMini, OS X 10.10 Yosemite, OS X 10.8 Mountain Lion, OS X 10.9 Mavericks, Power User, Scripting, Software Development, SuSE Linux, wget | Leave a Comment »

Fighting with IPv6 – There and back again

Posted by jpluimers on 2016/01/09

Interesting:

During the last weeks I finally got my hands dirty with IPv6. A comment on my blog and an email informed me that my server (hosting this blog) is not reachable via IPv6, albeit it has an IPv6 address. That said, I tried to get that running and fell into several holes, due to firewalls, […]

Source: Fighting with IPv6 – There and back again

Posted in *nix, *nix-tools, Apache2, iptables, Linux, Power User | Leave a Comment »

paping – Cross-platform TCP port testing, emulating the functionality of ping (port ping) – Google Project Hosting

Posted by jpluimers on 2015/12/22

Hopefully someone will move this to Github before Google code goes down: paping – Cross-platform TCP port testing, emulating the functionality of ping (port ping) – Google Project Hosting.

Paping (pronounced pah ping) is a computer network administration utility used to test the reachability of a host on an Internet Protocol (TCP/IP) network and to measure the time it takes to connect to a specified port

–jeroen

via:

Posted in *nix, *nix-tools, Communications Development, Console (command prompt window), Development, Internet protocol suite, Power User, TCP, Windows | 1 Comment »

some RewriteCond/RewriteRule links

Posted by jpluimers on 2015/12/21

Apache configuration can be tough, so here are some links related to RewriteRule.

One day I hope to write a more in depth article around some of them (:

–jeroen

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