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:
#include <sys/ioctl.h>
#include <asm/ioctls.h>
#include <stdio.h>
#include <fcntl.h>
// code by "dma" via https://forums.gentoo.org/viewtopic-p-2455159.html#2455159
int main(int argc, char *argv[]) {
int fd;
char shift_state;
fd = open("/dev/console", O_RDWR);
/*
* From console_ioctl:
* TIOCLINUX, subcode=6
* argp points to a char which is set to the value of the kernel
* variable shift_state. (Since 1.1.32.)
*/
shift_state = 6;
ioctl(fd, TIOCLINUX, &shift_state);
printf("shift_state = %i\n", (int)shift_state);
close(fd);
return shift_state;
}
view raw shift_state.c hosted with ❤ by GitHub
#!/bin/bash
shift_state=$(sudo ~/path/to/shift_state)
if (( $shift_state )) ; then
echo "shift-key active"
else
echo "shift-key not active"
fi
view raw somescript.sh hosted with ❤ by GitHub

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. Bitcoin Tip   Litecoin Tip

Written with StackEdit.