December 21, 2017

Configure directory for incoming files does not exist






Configure directory for incoming files does not exist ... blueman-services

problem:
Cannot due grayed out.  Rage.

solution:
gsettings set org.blueman.transfer shared-path '/home/USERNAME/Downloads/'


  

December 20, 2017

The host returns esxupdate error code:99





ESXi 6.x + Dell

The host returns esxupdate error code:99. An unhandled exception was encountered. Check the Update Manager log files and esxupdate log files for more details.


TL;DR

    ssh root@host
        esxcli software vib remove --vibname=OpenManage


Long version here: https://lonesysadmin.net/2016/05/27/esxupdate-error-code-99/
Thank you Bob


~~~

  

December 15, 2017

dd clone then resize





When you dd clone a partition to a larger disk...

for example
     sudo dd if=/dev/sdb1 of=/dev/sdc1 bs=1M conv=noerror status=progress
then it will unlikely show the correct size after mounted.

Fix it with
     sudo resize2fs /dev/sdc1


ATTENTION NOOBS:
DO NOT ARBITRARILY TYPE IN THE ABOVE COMMANDS, Be sure to use the verified correct devices or potentially suffer from total data loss.

(If you already swapped disks, then for example it might be /dev/sdb1 again)


  

December 12, 2017

Fight for Net Neutrality | Fight for the Future



The FCC is attempting end net neutrality, breaking the fundamental principle of the open Internet on Dec 14th 2017. Please help to retain current laws and fight FCC Chairman Ajit Pai's creatively mis-represented "Restoring Internet Freedom Order" draft.

 https://www.battleforthenet.com/  -OR-  https://act.eff.org/action/protect-the-open-internet-order


What is "Net Neutrality?"

Network neutrality means your ISP routes data packets without prejudice.

So why is this important?  While current regulations requiring network neutrality might superficially look like restrictions placed upon it, they're actually there to protect the relatively free market that exists on the net.

Without our current Net Neutrality laws, ISPs could easily leverage their state-guaranteed market position to "regulate" the Internet by proxy. They could pick winners in the market for Internet products and services, demand special fees from large ones, and block products and services arbitrarily.

Please contact your representatives to ensure this does not happen.

https://act.eff.org/action/protect-the-open-internet-order  -OR-  https://www.battleforthenet.com/


The Electronic Frontier Foundation  is the leading nonprofit organization defending civil liberties in the digital world

Battle for the Net is a project of:
Fight for the Future
Free Press Action Fund

* Thanks to ZeroTier-One for quotes above.

**********************************************************************
THE FCC HAS REPEALED NET NEUTRALITY
**********************************************************************
SUITS ANNOUNCED

~~~

December 08, 2017

CLI Shell Console SublimeText Alternative

icon

I love SublimeText! With features like Ctrl-D, Multi-Cursor, and RegEx-Search&Replace, it’s just the best editor ever. Add tools from PackageControl.io and it’s unbeatable. Yes, Atom is probably on-par (plus it’s free), but I’ve already acclimated to ST and that’s just how it is.

But sometimes i just prefer/need to edit in the shell. Almost always, i use nano; However, when you suddenly need something more powerful, it’s back to SublimeText.

I had known about slap-edit, but it’s just too slow, especially through ssh tunnels.

Enter Suplemon! Wow, it’s a great CLI editor to supplement your workflow. If you already have python and pip, then just sudo pip3 install suplemon - -That’s it. Launch suplemon and check it out.

demo

Yes, I know everyone will say “Vim”, but i don’t have time be that good.

~~~

Written with StackEdit.

December 05, 2017

LastPass Firefox Extension Repeatedly Asking for Two-Factor Authentication at Every Login

With the recent Firefox 57 release, I had experienced an annoying requirement with my LastPass add-on that required me to two-factor authenticate (2FA) each and every time I restarted Firefox.

At first, I saved a little effort by installing the Two-Factor Authenticator add-on so as to not require pulling my phone out constantly.
https://addons.mozilla.org/en-US/firefox/addon/two-factor-authenticator/

But really, i wanted this solved.

LastPass.com support suggested I purge my ~/.lastpass folder. I did so, but without resolve.

Other sources recommended purging two lastpass folders contained in the user profile:
~/.mozilla/firefox/YOURPROFILE/storage/permanent/indexeddb+++support-at-lastpass-dot-com/ , and
~/.mozilla/firefox/YOURPROFILE/jetpack/support@lastpass.com/
So i did; also without resolve.

More sources reported what I already suspected: The cookies that lastpass uses should not be deleted. So I made sure to whitelist lastpass.com and *.lastpass.com in my cookies cleaner.   In addition to Privacy > History > Keep Until they Expire.

This didn’t work immediately, so I dug into my FireFox preferences and found that un-checking “Offline WebSite Data” seemed to resolve my issue.  I had already unchecked "Cookies" and used "Cookies Auto delete" add-on to control cookies.
https://addons.mozilla.org/en-US/firefox/addon/cookie-autodelete/?src=userprofile

So in hindsight, I believe the combination of saving the lastpass.com cookies and Edit(Tools) > Preferences(Options) > Privacy > History > Settings >
 [UN-CHECK] Offline Website data
 [UN-CHECK] Cookies
is the final solution.

Note: Upon removal/re-installation or auto-update of the add-on, you will likely be required to 2FA again. But otherwise, the 30-day 2FA memory should be retained with the above solution.

Good Luck!
~~~
  

Setting Email Links to Open Gmail in Firefox

gmail icon

Associate email links in Firefox 57 to GMail or Yahoo Webmail (WebUI):

(In Linux):
Firefox > Edit > Preferences > General > Applications Section > mailto >
- Use GMail.
- Use Yahoo! Mail
- Use Other…





~~~

November 24, 2017

Basic Commandline Video Processing In Linux

video edit icon
Prerequisite: Install packages for MP4Box and ffpmpeg commands:
sudo apt install gpac ffmpeg

 

Three Methods to Trim Video:

  1. MP4Box -splitx ss:ss input.mp4 -out output.mp4 , where ss:ss are numerical values for start-seconds and stop-seconds. (Fastest, does not transcode)
  2. ffmpeg -i input.mp4 -ss hh:mm:ss -t hh:mm:ss -async 1 output.mp4, where hh:mm:ss are numerical values for hours, minutes, seconds.
  3. ffmpeg -i input.mp4 -vf trim=ss:ss output.mp4, where ss is a numerical value for seconds.
Annoyed with converting hours, minutes, seconds into total seconds? Use this bash function:
function to_sec() { echo "$1" | awk -F':' '{if (NF == 2) {print $1 * 60 + $2} else {print $1 * 60 * 60 + $2 * 60 + $3}}'; }
Usage examples: to_sec 2:47 or to_sec 1:2:47 or $(to_sec 2:47) or MP4Box -splitx $(to_sec 2:47):$(to_sec 7:33) input.mp4 -out output.mp4


 

Overlay a Logo onto Video:

    1. Static graphic logo:
ffmpeg -i input.mp4 \
-i logo.png \
-filter_complex "X:Y" \  # set logo position
-codec:a copy \  # just copy audio
output.mp4
where X:Y is the horizontal and vertical pixel positioning.
    2. Animated graphic logo:
ffmpeg -i input.mp4 \
-ignore_loop 0 -i animated-logo.gif \  # do not ignore looping
-filter_complex "X:Y:shortest=1" \  # limit to input video length
-codec:a copy \
output.mp4
where :shortest=1 is required, and where X:Y is the horizontal and vertical pixel positioning. Without shortest, the video transcoding will not end.
X and Y may be static numerical values, or ffmpeg built-in variables and equations. Examples:
  • Top right with 10 pixel margin : main_w-overlay_w-10:10
  • Top left with 10 pixel margin : 10:10
  • Bottom left with 10 pixel margin : 10:main_h-overlay_h-10
  • Bottom right with 10 pixel margin : main_w-overlay_w-10:main_h-overlay_h-10

 

 

Trim First x Seconds off Audio File:

ffmpeg -ss x -i input.mp3 -codec:a copy output.mp3 , where x is a numerical value for seconds.

 

Add Audio to Video and Trim to Shortest Source:

ffmpeg -i input.mp4 -i audio.mp3 -codec copy -shortest output.mp4

 

Overlay Logo and Add Audio with One Command:

ffmpeg -i input.mov \
 -i logo.png \
 -filter_complex "overlay=main_w-overlay_w-10:10" \
 -i music.mp3 -codec:a copy \
 -shortest output.mov
As always, good luck!
~~~
  

Firefox 57 Open Bookmarks in New Tab

icon

about:config –> browser.tabs.loadBookmarksInTabs = true




~~~
  

November 18, 2017

dpkg: error processing package docker.io (--purge)

docker icon
Uninstall (remove, purge) failed in Ubuntu 16.04 :
$ sudo aptitude purge docker docker.io
The following packages will be REMOVED:
  docker.io{p}
0 packages upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.
Do you want to continue? [Y/n/?]
(Reading database ... 386398 files and directories currently installed.)
Removing docker.io (1.13.1-0ubuntu1~17.04.1) ...
Purging configuration files for docker.io (1.13.1-0ubuntu1~17.04.1) ...

Nuking /var/lib/docker ...
  (if this is wrong, press Ctrl+C NOW!)

+ sleep 10

/var/lib/docker/nuke-graph-directory.sh: 64: /var/lib/docker/nuke-graph-directory.sh: shopt: not found
dpkg: error processing package docker.io (--purge):
 subprocess installed post-removal script returned error exit status 127
Errors were encountered while processing:
 docker.io
E: Sub-process /usr/bin/dpkg returned an error code (1)
It gives a hint: /var/lib/docker, so:
$ # This will erase all your container images
$ sudo rm -rf /var/lib/docker
$ sudo aptitude purge docker.io
The following packages will be REMOVED:
  docker.io{p}
0 packages upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.
Do you want to continue? [Y/n/?]
(Reading database ... 386398 files and directories currently installed.)
Removing docker.io (1.13.1-0ubuntu1~17.04.1) ...
Purging configuration files for docker.io (1.13.1-0ubuntu1~17.04.1) ...
dpkg: warning: while removing docker.io, directory '/etc/docker' not empty so not removed
It gave another hint: '/etc/docker' not empty so not removed , so:
$ # This will erase all docker configs
$ sudo rm -rf /etc/docker/
$ sudo aptitude purge docker.io
Package docker.io is not installed, so it will not be purged
Package docker.io is not installed, so it will not be purged
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.

Now if you need official and latest docker-ce (community edition) and docker-compose, see here:
https://docs.docker.com/engine/installation/linux/docker-ce/ubuntu/
https://docs.docker.com/compose/install/

~~~
Written with StackEdit.

November 15, 2017

Emergency Downgrade to Firefox 56

rewind firefox

Firefox 57 is out!!! Oh sh*t, half my plugins are gone and i can’t work!
I had previously automated daily firefox upgrades on my Debian 9 with a root cronjob:

@daily cd /home/USERNAME/Downloads && /usr/bin/curl -L -o firefox-latest-linux64.tar.bz2 "https://download.mozilla.org/?product=firefox-latest&os=linux64&lang=en-US" && tar xvf firefox-latest-linux64.tar.bz2 -C /opt/ && rm firefox-latest-linux64.tar.bz2 && ln -sf /opt/firefox/firefox /usr/bin/firefox

Today When i opened my favorite browser, “Hooray, FF 57!” … “CRAP, I can’t get my work done” because half my plugins are not compatible.
Here is the emergency downgrade to 56.0.2:

cd ~/Downloads
curl -L -o firefox-56.0.2.tar.bz2 "https://download.mozilla.org/?product=firefox-56.0.2-ssl&os=linux64&lang=en-US"
sudo tar xvf firefox-56.0.2.tar.bz2 -C /opt/ && sudo ln -sf /opt/firefox/firefox /usr/bin/firefox



~~~
Written with StackEdit.

September 25, 2017

Concise ShadowGroup Powershell Scripts

sync icon

The definition of a shadowgroup is simply the synchronization of members in an Active Directory OU to the memberships of an Active Directory Group.

Thanks goes to David K. Sutton for his post at ravingroo.com.

One caveat of his concise script was that Get-ADGroupMember, by default, has a limit of 5000 objects returned. Other internet sources reported an easy workaround by using the member property of the get-adgroup cmdlet.

So I present to you modified versions of a concise ShadowGroup powershell script. One no-frills version, and another with email support.

~~~
  

August 10, 2017

ESXi boot slow/stalled/stuck at "iscsi_vmk loaded successfully"

esxi-screen

Problem: ESXi boot slow/stalled/stuck at “iscsi_vmk loaded successfully”

Cause: Unfortunately this is normal due to:
  • Dynamic Discovery.
  • Software iSCSI Adapter LoginTimeout=XX causes XX second timeout for each Dynamic discovery.
Solution 1: Leave it alone !! (It's just slow.)
Solution 2: Reduce LoginTimeout (Dell recommends LoginTimeout=60, but that's a "long wait". Try 20.)
Solution 3: Make it all static. (Meh, too much work.)

Additional troublshooting: Alt+F12 for console logs.
~~~
  

June 12, 2017

GPO Map Drive Login Script not working

Group

Problem: Active Directory Group Policy Logon Script to Map Drive fails to execute when applied to specified A.D. Group.

Likely Cause: The GPO “Security Filtering” must also include computers, not just the Groups.

Solution: Set the “Security Filtering” to include “Domain Computers” as well as the desired user groups.

  

June 08, 2017

RHEL7 CentOS7 chroot-named


enter image description here

Recently, I replaced two old RHEL5 DNS BIND (named) servers to RHEL7. Essentially, I took the easy route and used WebMin config backups to setup the new servers. However, i did come across some easily resolvable issues.


Problem: I want to replace named with chroot-named

Solution:

yum -y install bind-chroot

systemctl stop named
systemctl disable named

/usr/libexec/setup-named-chroot.sh /var/named/chroot on
mkdir /var/named/chroot/var/named/data
chown named:named /var/named/chroot/var/named/data

systemctl enable named-chroot
systemctl start named-chroot


Problem: Job for named-chroot.service failed because the control process exited with error code.

Solution: you need to mkdir/chown data directory as described above.

You can get additional service status info with journalctl -xe -u named-chroot


Problem: zones aren’t being transferred or files are access-denied (as seen with with the above journalctl command )

Solution:

#DNS1 (optional?)
scp -p /var/named/chroot/var/named/*.{rev,hosts} root@DNS2:/var/named/chroot/var/named/slaves/

#DNS2
chown -R root:named /var/named/chroot/var/named/slaves/
chmod 770 /var/named/chroot/var/named/slaves/
chmod 660 /var/named/chroot/var/named/slaves/*

~~~

Written with StackEdit.

June 01, 2017

MS Edge? NO THANKS!!!!!

Somehow, recently while using Firefox on Debian, a websearch produced an MS page with a banner-nag... WTF?


  

May 18, 2017

Latest Adobe Flash Player in Firefox again (Linux)


Apparently Adobe is updating NPAPI flash player for firefox again. https://get.adobe.com/flashplayer/

(But only until 2020 -- https://blogs.adobe.com/conversations/2017/07/adobe-flash-update.html)

In Debian 8 Jessie or Debian 9 Stretch, simply perform: sudo aptitude install flashplayer-mozilla



Don't forget the settings manager: https://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager02.html

You can test your version here or here:
https://get.adobe.com/flashplayer/about/
https://helpx.adobe.com/flash-player.html
~~~

May 04, 2017

Win10 Sucks | Repair Win10 | Fix Win10 | How to exit Rage-Mode



list of necessity:







ctrl-shift right-click taskbar item for "Restore, Move, Size, Min, Max"

ctrl-shift left-click taskbar pinned item to "RunAs Admin"

create Show Desktop shortcut with:
%windir%\explorer.exe shell:::{3080F90D-D7AD-11D9-BD98-0000947B0257}

create Logoff Shortcut with:
%windir%\System32\logoff.exe
or alternatively: 
%windir%\System32\shutdown.exe /L


~~~
seo:
Fix Windows 10
Windows 10 sucks
I hate windows 10
Repair Windows 10
Windows 10 Stupidity
Windows 10 is fucking stupid
Windows 2016 is just as fucking stupid


May 01, 2017

bash if shift-key pressed

shift-key

I had to write a custom bash launch script for a local machine, but wanted it to do one thing if the shift-key was pressed and another thing if it was not.

After searching, i found that bash is NOT capable of such a thing. However, there was a short and simpe C implementation found here: https://forums.gentoo.org/viewtopic-p-2455159.html#2455159

So after compiling the code (gcc shift_state.c -o shift_state ; chmod +x shift_state) and explicitly running it under sudo (required to access /dev/console), i found it did exactly what was needed.

So the only problem remaining was i didn’t want to run my bash script with sudo. To circumvent such, i ran sudo visudo and added the line myusername ALL=(ALL) NOPASSWD: /home/myusername/scripts/shift_state which would allow me to run sudo ~/scripts/shift_state without entering my password.

Subsequently, it was easy to implement a bash script as needed.

Code:

But wait, there's more!

Such could also be used to customize your XFCE Panel-based launch-bar. (Or any launch-bar for that matter.) For instance, In the past, I've created a panel item for Sublimetext. This is a "Launcher" item with two sublimetext commands, one launches and another launches with the -n parameter for a new window. However, it looks ugly and a bit cumbersome to launch:

With the shift_state method, I have replaced the Launcher commands with a single command: bash -c "if ! (( $(sudo ~/scripts/shift_state) )) ; then /opt/sublime_text/sublime_text %F ; else /opt/sublime_text/sublime_text -n %F ; fi". Now it looks better without a secondary command-arrow, and when I shift-click to launch, it provides me the same function in a quicker workflow way.

~~~

As Always, Good Luck! You can thank me with bitcoin.   

Written with StackEdit.

April 28, 2017

Replace/Supplant/Overwrite Hamachi with ZeroTier-One

vpn

Wait there just one moment -- you mean to tell me I never posted about replacing Hamachi for something in “orders of magnitude” better?!!? How absurd of me.

Purge that crippled software and reconstitute with ZeroTier-One immediately! ZeroTier is cross-platform and even works on my obsolete Synology 410j. Forget Hamachi FOREVER!

Free Versions of Hamachi ZeroTier-One
Nodes per network 5 100
Bandwidth Low High
Dropped Connection Often Rare †
IP Assignment Auto-assigned Auto-assigned or Static
IPv4 Subnets 25.*.*.* 10.147.17.* 10.147.18.* 10.147.19.* 10.147.20.* 10.144.*.* 10.241.*.* 10.242.*.* 10.243.*.* 10.244.*.* 172.22.*.* 172.23.*.* 172.24.*.* 172.25.*.* 172.26.*.* 172.27.*.* 172.28.*.* 172.29.*.* 172.30.*.* 192.168.191.* 192.168.192.* 192.168.193.* 192.168.194.* 192.168.195.* 192.168.196.*
IPv6 yes RFC4193 (/128) & 6PLANE (/80)
Traffic Filtering Client Firewall Custom traffic and protocol (“Flow”) rules with v1.2.x
SourceCode Closed Source Open Source and freedom loving
Free Support Forums; but often goes unanswered Support button on website, Knowledge-Base, and Forums; Super responsive

† The only time my connection dropped, was when ZeroTier versioned from 1.1.4 to 1.2.x and a couple of my clients had to be re-authorized & re-IP’d via WebUI. Doing so put them back online without touching the clients. Now that’s cool.

I'm syncing files over my ZeroTier VPN now.  You could consider replacing DropBox and BTSync with SyncThing. See my previous post for a quick and dirty install.

Other cross-platform Hamachi alternatives that I have not tried (because ZeroTier-One just works!) :
- SoftEther VPN
- tinc vpn
- FreeLAN
- NeoRouter Free (as opposed to the Mesh and Pro versions)

~~~~~~~~~~~





meanwhile back at the batlab
$ sudo aptitude purge logmein-hamachi
The following packages will be REMOVED:
logmein-hamachi{p}
0 packages upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
Need to get 0 B of archives. After unpacking 2,867 kB will be freed.
Do you want to continue? [Y/n/?] YYYYYYY
(Reading database ... 105225 files and directories currently installed.)
Removing logmein-hamachi (2.1.0.86-1) ...
Stopping LogMeIn Hamachi VPN tunneling engine logmein-hamachi *
Removing any system startup links for /etc/init.d/logmein-hamachi ...
/etc/rc0.d/K49logmein-hamachi
/etc/rc1.d/K49logmein-hamachi
/etc/rc2.d/S11logmein-hamachi
/etc/rc3.d/S11logmein-hamachi
/etc/rc4.d/S11logmein-hamachi
/etc/rc5.d/S11logmein-hamachi
/etc/rc6.d/K49logmein-hamachi
Purging configuration files for logmein-hamachi (2.1.0.86-1) ...

Current status: 5796 new [-1].
$ echo "joy"
~~~~~~~~~~~
Partially written with StackEdit.

April 26, 2017

ghetto bash-prompt git-status

There are tons of awesome and beautiful bash-prompt and zsh-prompt git-status scripts out there.
https://duckduckgo.com/?q=bash+prompt+git+status&t=ffab&ia=software

You can find stuff like this for zsh and bash:


But this is NOT that.

I’m not a heavy developer, i just wanted something quick and easy. Enter my “ghetto bash-prompt git-status”



This will NOT change your existing prompt, it simply executes as the last instruction before your prompt is displayed.

If you want something better, look into:
- https://github.com/magicmonty/bash-git-prompt
- https://gist.github.com/clux/864a4168712b9c28515a27de77f7c503
- https://github.com/riobard/bash-powerline
- https://github.com/taketwo/powerline-shell
- https://github.com/brujoand/sbp
- http://volnitsky.com/project/git-prompt/


~~~

VMWare PowerCLI 6.5 now easily installed via PowerShellGet

PowerCLI


EDIT 2023: please see https://williamlam.com/2022/11/how-to-install-powercli-13-0-and-use-new-image-builder-auto-deploy-cmdlets-on-apple-silicon.html and https://www.virten.net/2022/12/how-to-install-powercli-13-with-python-3-7-on-windows-required-for-imagebuilder/ for extra help regarding python 3.7 dependency.

~~~~ OP ~~~~:

VMWare PowerCLI 6.5.x++ now easily installed via PowerShellGet! https://www.powershellgallery.com/packages/VMware.PowerCLI/

PS> Install-Module -Name VMware.PowerCLI -Confirm:$false -Scope AllUsers -AllowClobber -Force

That’s it! …However, You may also need to update occasionally:

PS> Find-Module "VMWare.*" | Update-Module -Verbose

Your scripts may begin with Import-Module VMware.VimAutomation.Core



See the vmware blog for more info, including installing under an administrator account for an “AllUsers” install (Very helpful for multi-user workstations): https://blogs.vmware.com/PowerCLI/2017/04/powercli-install-process-powershell-gallery.html i.e. [...] -Scope AllUsers

Separately, you may update all your powershell help files with Update-Help



If you wish to purge PowerCLI, do so with the following from a standard Powershell (not PowerCLI):

PS> (Get-Module VMware.PowerCLI -ListAvailable).RequiredModules | Uninstall-Module -Force
PS> Get-Module VMware.PowerCLI -ListAvailable | Uninstall-Module -Force


~~~
As Always, Good Luck!
  

April 25, 2017

AH00072

apache
Problem:
Previously working, but now
Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:443

Probable Cause:
Any two or more .conf files have Listen 443 or <VirtualHost _default_:443> in them.

Tentative Solution:
Edit your /etc/httpd/httpd.conf or other /etc/httpd/conf.d/*.conf files making sure you don’t have two files requesting port 443. It seems recent Apache versions are more strict and will fail to run, whereas older versions did not complain. Technically, I just the renamed /etc/httpd/conf.d/ssl.conf to /etc/httpd/conf.d/ssl.conf.OFF so that my actual /etc/httpd/conf.d/live_ssl.conf file was used.
  

April 20, 2017

a stop job is running for ifup | NetworkManager

refuse

Problem:
a stop job is running for ifup
a stop job is running for NetworkManager

Why:
Debian Jessie and jessie-backports systemd versions 2.15 and 2.30 respectively have a small bug that stalls shutdown.

Tentative Solution: (i.e. unofficial; your mileage may vary)
edit /etc/systemd/system/network-online.target.wants/networking.service, replacing

ExecStop=/sbin/ifdown -a --read-environment

with

ExecStop=/sbin/ifdown -a --read-environment --force --ignore-errors

and also

TimeoutStopSec=5min

with

TimeoutStopSec=5s

~~~

  

April 19, 2017

font icons displaying as squares in conky

conky

Problem:
FontAwesome and other font-based icons showing as squares in conky.

Solution:
conky <= v1.9 : override_utf8_locale yes
conky >=v1.10.x : override_utf8_locale = true,
  

March 28, 2017

install docker in debian jessie without unnecessary cgroupsfs-mount, mountall, and plymouth dependencies

docker

Install docker on your debian jessie workstation without unnecessary cgroupsfs-mount, mountall, and plymouth recommended dependencies.

Reference: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=783143

Prerequisite: jessie-backports. Configure jessie-backports or the riskier unstable “sid” repositories before proceeding.

sudo aptitude install aufs-tools libnih-dbus1 libnih1 makedev git
sudo aptitude install -t jessie-backports --without-recommends docker.io

This should work, but be aware aptitude show docker.io shows these are required also:

Depends: adduser, iptables, init-system-helpers (>= 1.18~), perl, libapparmor1 (>= 2.6~devel),
 libc6 (>= 2.14), libdevmapper1.02.1 (>= 2:1.02.90), libsqlite3-0 (>= 3.5.9)

Now add your user account to the docker group; otherwise you will receive the error “permission denied. Are you trying to connect to a TLS-enabled daemon without TLS?”

sudo gpasswd -a $USER docker ( same as sudo usermod -a -G docker $USER)

Logout and re-login. Potentially, you could also exec su -l $USER

Now start docker and set it enabled by default.

sudo systemctl enable docker
sudo systemctl start docker

Now install your preferred containers

docker pull vmware/powerclicore

~ ~ ~
  

Docker : "permission denied. Are you trying to connect to a TLS-enabled daemon without TLS?"

docker

Docker : “permission denied. Are you trying to connect to a TLS-enabled daemon without TLS?”, when docker pull

solution: add username to group docker, logout and relogin ; make certain the service is running

sudo groupadd docker
sudo gpasswd -a $USER docker (same as sudo usermod -a -G docker $USER)

Logout and re-login. Potentially, you could also exec su -l $USER

sudo cystemctl start docker
sudo cystemctl enable docker #if you want it enabled by default

~ ~ ~
  

March 27, 2017

persistent powershell commandline history

PowerShell

Persistent PowerShell CommandLine History

via https://github.com/lzybkr/PSReadLine (& https://technet.microsoft.com/en-us/library/bb613488(v=vs.85).aspx)

TL;DR :
Win10 install module:
Install-Module PSReadline

edit* system’s powershell profile:
notepad c:\windows\system32\WindowsPowerShell\v1.0\profile.ps1

to the end of the file, add:
Import-Module PSReadline

restart powershell

*(never use notepad, use https://www.sublimetext.com/ + https://packagecontrol.io/ instead)

  

February 10, 2017

PDF editing in linux



Linux users probably already know all the PDF tools available from their respective repositories.  Tools like pdfchain, pdfconcat, pdfgrep, pdfcrop, pdfimages, and pdfseparate seem to be the most useful commandline utilities.

However, i also use a GUI PDF editor that is typically not available via repositories.  I have found this product to be invaluable and well worth mention.

Please visit https://code-industry.net/masterpdfeditor/ to make use of this extraordinary free tool.

It includes all the functions needed to graphically modify, highlight, or annotate PDFs.  One of the most difficult things to do to PDFs in linux is to edit text.  Be assured, Master PDF Editor will allow you to do such.


  

January 12, 2017

PowerShell list users with Expired Passwords


Get-ADUser -filter {Enabled -eq $True -and PasswordExpired -eq $True} -Properties "DisplayName"


Please see this for automated expiration emails: https://steronius.blogspot.com/2018/04/in-production-active-directory-password.html