The trick is to use the choice command; see [WayBack] if statement – How to ask for batch file user input with a timeout – Stack Overflow
–jeroen
Posted by jpluimers on 2019/05/14
The trick is to use the choice command; see [WayBack] if statement – How to ask for batch file user input with a timeout – Stack Overflow
–jeroen
Posted in Batch-Files, Development, Microsoft Surface on Windows 7, Power User, Scripting, Software Development, Windows, Windows 10, Windows 7, Windows 8, Windows 8.1, Windows 9, Windows Server 2000, Windows Server 2003, Windows Server 2003 R2, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Windows Server 2016, Windows Vista, Windows XP | Leave a Comment »
Posted by jpluimers on 2019/05/02
A small script I made: Show SCSI / HBA modules in ESXi 6.5 with file and version information:
MODULES=`esxcfg-scsidevs --hbas | awk 'FNR > 0 {print $2}'`
for MODULE in $MODULES ; do
# echo "Probing $MODULE"
vmkload_mod --showinfo $MODULE | grep 'file: \|Version'
done
The script is based on ideas from [WayBack] Determining Network/Storage firmware and driver version in ESXi 4.x and later (1027206) | VMware KB
It works in at least ESXi 6.5 where it shows this on one of my systems:
input file: /usr/lib/vmware/vmkmod/lsi_msgpt3 Version: 12.00.02.00-11vmw.650.0.0.4564106 input file: /usr/lib/vmware/vmkmod/vmw_ahci Version: 1.0.0-39vmw.650.1.26.5969303 input file: /usr/lib/vmware/vmkmod/vmw_ahci Version: 1.0.0-39vmw.650.1.26.5969303 input file: /usr/lib/vmware/vmkmod/vmw_ahci Version: 1.0.0-39vmw.650.1.26.5969303 input file: /usr/lib/vmware/vmkmod/lsi_mr3 Version: 6.910.18.00-1vmw.650.0.0.4564106 input file: /usr/lib/vmware/vmkmod/megaraid_sas Version: Version 6.603.55.00.2vmw, Build: 4564106, Interface: 9.2 Built on: Oct 26 2016 input file: /usr/lib/vmware/vmkmod/vmkusb Version: 0.1-1vmw.650.1.26.5969303
–jeroen
Posted in bash, Development, ESXi6.5, Power User, Scripting, Software Development, Virtualization, VMware, VMware ESXi | Leave a Comment »
Posted by jpluimers on 2019/04/30
On my research list: [WayBack] bash – aliasing cd to pushd – is it a good idea? – Unix & Linux Stack Exchange
It has a nice discussion on complements to pushd/popd/cd/dirs including a very nice set of navd scripts that eases the navigation of the directory stack.
I found it because the ESXi busybox does not have pushd and popd and a cd won’t work from inside a shell script: [WayBack] linux – Why doesn’t “cd” work in a bash shell script? – Stack Overflow
It also made me find out that the ESXi busybox does support cd - to go to the previous directory. More info on that cd syntax is at [WayBack] bash – Difference between “cd -” and “cd ~-” – Unix & Linux Stack Exchange
–jeroen
Posted in *nix, bash, Development, ESXi5, ESXi5.1, ESXi5.5, ESXi6, ESXi6.5, Power User, Scripting, Software Development, Virtualization, VMware, VMware ESXi | Leave a Comment »
Posted by jpluimers on 2019/04/24
A few years ago, Firefox changed the default “network.http.response.timeout” value from zero to 300 seconds (5 minutes).
Display style systems that show refreshing web pages, this can be a problem as when the connection to the web-server is unavailable for more than 5 minutes, then the page will show “The connection has timed out” and stop refreshing.
The solution – apart from fixing each and every connection problem – is to either restore the value or make it very long:
network.http.response.timeout=0network.http.response.timeout=30000Changing this works similarly like in A way to skip the Firefox “Well, this is embarrassing” during a sudden reboot « The Wiert Corner – irregular stream of stuff:
about:config in the addressbar
Confirm theThis might void your warranty!I accept the risk!network.http.response.timeoutdefault value 0 to the user set value 0–jeroen
Via:
ffprofile = webdriver.FirefoxProfile()
ffprofile.set_preference("network.http.response.timeout", 30000) #replace 30000 with the number of seconds you want the max delay to be
browser = webdriver.Firefox(firefox_profile=ffprofile)
Posted in Development, Firefox, Power User, Scripting, Software Development, Web Browsers, Web Development | Leave a Comment »
Posted by jpluimers on 2019/04/15
Cool tool if you use Postfix: mail-filters/Makefile at master · fumiyas/mail-filters.
You set it up like this:
cd /etc/postfix
wget https://raw.githubusercontent.com/fumiyas/mail-filters/master/postfix/Makefile
Then each time you change your postfix configuration:
cd /etc/postfix
make
In that directory, it will (re)generate a Makefile.postmapbased on the lines with hash in main.cf, then make each .db file from the source hash file.
After that you have to manually restart postfix, which depends on your Linux flavour.
Similar solutions:
–jeroen
Posted in *nix, *nix-tools, Development, Makefile, postfix, Power User, Scripting, Software Development | Leave a Comment »
Posted by jpluimers on 2019/04/15
Just when I thought I made a note of a password I hardly ever use, I didn’t, luckily this open source tools understands how to recover many kinds of passwords: AlessandroZ/LaZagne: Credentials recovery project.
–jeroen
Posted in *nix, *nix-tools, Chrome, Development, DVCS - Distributed Version Control, Firefox, git, Internet Explorer, Office, Opera, Outlook, Power User, Python, Scripting, Skype, Software Development, Source Code Management, Web Browsers, WiFi, Windows | Leave a Comment »
Posted by jpluimers on 2019/04/11
I wrote about bookmarklets before, but more from a usage perspective, not from a programmers one.
From what I understand now is that:
javascript:(function(){ window.open('https://wiert.me/'); })();My first tries will likely be:
Posted in Bookmarklet, Development, JavaScript/ECMAScript, jQuery, Power User, Scripting, Software Development, Web Browsers | Leave a Comment »
Posted by jpluimers on 2019/04/01
I know I’m going to need this one day: [WayBack] debugging – Find what javascript changes the DOM? – Stack Overflow
Via: [WayBack] Javascript “Why”: Wenn ich eine fertig geladene Webseite sehe und wissen möchte, warum “dieses Element da” (Bild, Script, div) geladen worden ist, wie… – Kristian Köhntopp – Google+
–jeroen
Posted in Chrome, Development, JavaScript/ECMAScript, Power User, Scripting, Software Development, Web Browsers, Web Development | Leave a Comment »
Posted by jpluimers on 2019/03/21
Cool stuff: [WayBack] Python Data Science Handbook | Python Data Science Handbook.
Based on that I learned a lot of things on book publishing:
The Jupyter Notebook is a web-based interactive computing platform. The notebook combines live code, equations, narrative text, visualizations, interactive dashboards and other media.
Via: [WayBack] You can read the Python Data Science Handbook by @jakevdp for free on his website – ThisIsWhyICode – Google+
–jeroen
Posted in Development, Python, Scripting, Software Development | Leave a Comment »