Skip to main content

Posts

Showing posts from December, 2017

Automatically Open DevTools when newtab open in Browser

One of cool topic which is told by my friend, He is web developer we want devtools to open whenever new tab get open so we searched the internet to automatically open devtools there are plenty but none didn't work for me So I decided to write by own using some browser addon i have Here the procedure is for MAC Tools:       [+] GreaseMonkey -> available for firefox       [+] TamperMonkey -> incase of chrome Working: I achieved this using Client-Server Model Client : Browser using the GreaseMonkey/TamperMonkey send the request to the Server Server: If any request received from client, It send the KeyStroke option+command+c ( differs for Operating system  )   so the devtools will open Program: Client Side ======== // ==UserScript== // @name Unnamed Script 977967 // @version 1 // @grant none // @require https://cdnjs.cloudflare.com/ajax/libs/socket.io/2.0.4/socket.io.js // @include * // ==/UserScript== var socket = io . connect ( 

Enable or Disable USB in Linux

To Enable / Disable USB  To really disable and enable USB, lets say port 3 and device 2 (you can get the information from lsusb -t) echo '3-2' | sudo tee / sys / bus / usb / drivers / usb / unbind echo '3-2' | sudo tee / sys / bus / usb / drivers / usb / bind Another Method chmod 000 /media/  here is where device is mounted hence make it 000 -> not able to read or write files chmod 777 /media/   extact opposite to above i.e able to read and write the files the above chmod is nothing but change mode which is a part of unix/linux code mainly used for read or write permission that can be represented by numbers.