Skip to main content

Inventions and kill switch




Inventions and Kill Switch


In the human history, just after the iron age, people looked for more. Something better than metal. Maybe stronger like diamonds? Or maybe cheaper and lighter. By 1800s people knew almost everything about metal and what they could have done with them. Multiple industrial usages like vehicles, weapons, home appliances and much more.

In 1860, an English chemist known as Joseph Swan produced the first Carbon Fibers. Later on it was identified that could be produced stronger that most metals, no corrosion, water resistant and much lighter. Still perhaps it was bit expensive to produce.

People wanted more. In 1907 a Belgian chemist known as Leo Hendrik invented an unusual material that with some improvements it was virtually indestructible by any natural cause. This was one of the great inventions ever. It could build almost everything. Home appliances, food containers even vehicles. More than anything it was really cheap to build. Now we live in 2019 more than 100 years passed. Most of the stuff that built from them are still there without any decay.

Guess what! Leo’s last name was Baekeland and his invention was Bakelite the very first synthetic polymer or plastic. Later on, scientists were able to make better plastic materials and people built almost everything with them. What they forgot to build was a proper kill switch to this indestructible material. Thus they keep piling up on the earth and in the ocean, leaving the animals and the whole world in danger. Even there were kill switches or methods of recycling, they are either expensive or  inefficient. Probably its about time that someone discover a better alternative recycling method before it is too late.

So, it could be a good idea to think about a kill switch also whenever you build something.


Did you know that there is a kill switch in Ubuntu machines? 


In older Ubuntu versions, it was enabled by default. Later on it was identified as a potential security bug and they have disabled it. Still, we can see the switch out there waiting to be found.

The idea of the usage is, whenever your system is crashed or non-responsive, you can make it reboot just by pressing a magic key sequence.

shortcut keys - Alt + sysrq + REISUB
When you type in the last key "B", the system is going to halt whatever the program that is currently running and start rebooting itself.

However, with the newer Ubuntu versions (12.10 and newer), this is turned off by default. You can see how to enable it by reading the config file

/etc/sysctl.d/10-magic-sysrq.conf


------------------------------------------------------------------------------------------
# The magic SysRq key enables certain keyboard combinations to be
# interpreted by the kernel to help with debugging. The kernel will respond
# to these keys regardless of the current running applications.
#
# In general, the magic SysRq key is not needed for the average Ubuntu
# system, and having it enabled by default can lead to security issues on
# the console such as being able to dump memory or to kill arbitrary
# processes including the running screen lock.
#
# Here is the list of possible values:
#   0 - disable sysrq completely
#   1 - enable all functions of sysrq
#  >1 - enable certain functions by adding up the following values:
#          2 - enable control of console logging level
#          4 - enable control of keyboard (SAK, unraw)
#          8 - enable debugging dumps of processes etc.
#         16 - enable sync command
#         32 - enable remount read-only
#         64 - enable signalling of processes (term, kill, oom-kill)
#        128 - allow reboot/poweroff
#        256 - allow nicing of all RT tasks
#
#   For example, to enable both control of console logging level and
#   debugging dumps of processes: kernel.sysrq = 10
#
kernel.sysrq = 176
------------------------------------------------------------------------------------------




Comments

Popular posts from this blog

VLC skins

It's been a while from my first blog post, so today I thought to make a blog post about skins in VLC player. I think you all are familiar with VLC player if not, here's the link for the website www.videolan.org/vlc/index.htm l In brief, VLC player is a free and opensource player that can play almost all the types of media formats. Even though it is a such a nice player, it looks kind of old and rusty, like the windows classic look. But you can make it prettier by just adding some new skins to it.  You can download skins for the player from here http://www.videolan.org/vlc/skins.php Then place the downloaded skin file (.vlt file) in the " skin " folder in the installation directory.           eg:- in windows:    C:\Program Files\VideoLAN\VLC\skins           or in linux systems:  ~/.local/share/vlc/skins Then, open the VLC player and go to the preferences. ...

How to set terminal title in Ubuntu 18.04 LTS

In older Ubuntu versions, you could have just right-clicked on the Ubuntu Terminal window's title bar and set any title you would like. But unfortunately after Ubuntu 18.04 LTS this feature is gone. I used to love this feature because I'm multiple tabs in the single terminal window kind of a guy. I usually like to work in multiple named terminal tabs like below. By default, in newer Ubuntu version, it is showing just the current directory. Let's see how we can do this. Ubuntu prompt In ubuntu's Bash, there's an environment variable $PS1 which is responsible for the details that the command line prompts. You'll be able to echo this and see what's inside it. If I echo it it will print something like this. echo $PS1 \[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ If you really want to understand what this means, you can refer this page .  Updating the termina...

Java, how to create a list with a single element

 I wanted to create a Java List with a single element. Yet, I wanted to add more elements later. So, I was looking for a couple of ways to do this. So far there are multiple elegant ways to create a list with a single element with a one-liner. Not so much for a modifiable list though. Here's what I gathered so far. Followings are a few ways of creating a list with strictly a single entry. Can't add more elements. 1. Collections.singletonList() This returns an immutable list that cannot be modified or add more elements. // An immutable list containing only the specified object. List<String> oneEntryList = Collections. singletonList ( "one" ) ; oneEntryList.add( "two" ) ; // throws UnsupportedOperationException 2.  Arrays.asList() This returns a fixed-size list consisting of the number of elements provided as arguments. The number of elements provided would be an array hence the size is fixed to the length of the array. // Returns a fixed-size list List...