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 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 »
Posted by jpluimers on 2017/01/30
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
- 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- Run the following command to stop the Windows Search service:
net stop wsearch- Run the following command to perform offline compaction of the Windows.edb file:
esentutl.exe /d %AllUsersProfile%\Microsoft\Search\Data\Applications\Windows\Windows.edb- Run the following command to change the Windows Search service to delayed start:
sc config wsearch start= delayed-auto- Run the following command to start the service:
net start wsearch
Notes:
C:\ProgramData\Microsoft\Search\Data\Applications\Windows\Projects\SystemIndex\Indexer\CiFiles\ directory:
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
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 »
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:
–jeroen
Posted in *nix, Apache2, Linux, openSuSE, Power User, SuSE Linux | Leave a Comment »
Posted by jpluimers on 2017/01/27
These seem to be the brands to look into:
Source: Multiple wifi access points / seamless handoff – Spiceworks
–jeroen
Posted in Internet, Power User, Ubiquiti, WiFi | Leave a Comment »
Posted by jpluimers on 2017/01/26
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.
–jeroen
Posted in *nix, Hardware, Pen Testing, Power User, Security, USB | Leave a Comment »
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 »
Posted by jpluimers on 2017/01/25
For I a very long time, I’ve been formatting code until about 130 characters width and recently remembered out why:
… remember printing in landscape allowed 132 characters.At Uni, I used to regularly print my code on green bar paper…
Source: Is it common to print out code on paper? – Programmers Stack Exchange
It got back memories of working on VT102 terminals and Hercules Graphics Cards adapters doing VAX-VMS (FORTRAN and Pascal) and DOS (Turbo Pascal) programming. The VT102 could do 132 columns (the VT52 only 80) and it was no coincidence that most HGC could do 132 columns as well.
Printing was usually on green-bar paper (in Dutch “zebra-papier”) which was 132 columns wide in landscape form on most line printers.
–jeroen
Posted in Development, Power User, Software Development | 1 Comment »
Posted by jpluimers on 2017/01/24
The Let’s Encrypt certbot (formerly letsencrypt) had some trouble on my machinery.
When trying to test if Apache default default · Issue #3307 · certbot/certbot and opensuse Tumbleweed: Each time I run certbot, a line with Listen 443 gets added to /etc/apache2/httpd.conf · Issue #3364 · certbot/certbot were fixed, I had to run certbot directly using specific github branches.
Normally certbot queries https://pypi.python.org/pypi/certbot/json to install the latest sanctioned version of itself. Which means this won’t work to run the version from github:
git clone https://github.com/certbot/certbot.git cd certbot ./cerbot-auto <<command-line-parameters>>
But the below does:
git clone https://github.com/certbot/certbot.git cd certbot git checkout -b <<branch-name>> ./letsencrypt-auto-source/letsencrypt-auto --os-packages-only ./tools/venv.sh source venv/bin/activate cerbot <<command-line-parameters>>
The last statement will run ./venv/bin/certbot but you can also hard-code that (or perform which certbot to verify the directory is on the pat).
I used it to test with this branch:
git checkout -b origin/osrelease_like
The above are basically steps to setup a virtualenv as mentioned in Developer Guide — Certbot 0.9.0.dev0 documentation.
To undo, just run this from the certbot directory:
deactivate rm -rf venv
The first statement will adjust your path and the second get rid of the virtual environment including all packages that were downloaded in it.
If you forgot to remove the venv directory, there might be old versions hanging around named like venv.1470590779.bak where the number in the middle is the number of seconds since unix epoch (1970-01-01 00:00:00 UTC) which you might want to remove as well.
Inside the venv environment you can use all kinds of Python tools, for instance:
pip install ipdb after which you can add import ipdb;ipdb.set_trace() to any source line to break right into the Python debugger. There, it will drop you into debug console, which is pretty much fully fledged Python interpreter.pip freeze to show all installed Python packages.While testing, you can use the --test-cert or --staging command-line-options to use the Let’s Encrypt staging-environment this prevent running into the live environment rate limits (the main ones at time of writing are a Duplicate Certificate limit of 5 certificates per week and a Certificates per Registered Domain limit of 20 per week, whichever limit is lower).
–jeroen
Posted in *nix, Encryption, Let's Encrypt (letsencrypt/certbot), Linux, openSuSE, Power User, Security, SuSE Linux | Leave a Comment »
Posted by jpluimers on 2017/01/23
This was a tad difficult to find as I searched for “Convert Fritz!Box to Switch” instead of “Convert Fritz!Box to Access Point”.
Since I had an old Fritz!Box 7360 lying around (from my ADSL era) and wanted to extend the cabled LAN for my brothers Fritz!Box 7490 with some low-bandwidth devices (max 100 megabit/second) I searched for Switch. My bad.
Oh I had to factory reset it as well as I forgot the management credentials. The AVM help on this is cumbersome: Loading the FRITZ!Box factory settings | FRITZ!Box 7360 | AVM International but the xs4all help includes a web-reset procedure as part of Internet: Reset procedures van mijn FRITZ!Box 7360 which translates to:
Anyway: with the above steps it becomes a Managed Switch (and if you don’t disable WiFi: Access Point too) that uses the primary internet connection as DHCP server (so it gets an IP address itself as well which means you can manage it).
Posted in ADSL, Fritz!, Fritz!Box, Internet, Power User | Leave a Comment »
Posted by jpluimers on 2017/01/22
New scans at BitSavers
Sun Remarketing MFM controller:
Sony disk drive OA-D34V-22 pictures
Service documentation:
–jeroen
Posted in Apple, Apple ][, Classic Macintosh, History, Power User | Leave a Comment »