Skip to content

Instantly share code, notes, and snippets.

Mohamed Hussain S H shmdhussain

  • Sky News Arabia
  • AbuDhabi, UAE
Block or report user

Report or block shmdhussain

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
shmdhussain / display-none-h-key-devtool.js
Created Jan 29, 2018
In Chrome clicking "h" key in elements tab of devtools panel should toggle the hide/show
View display-none-h-key-devtool.js
var cssRule = `.__web-inspector-hide-shortcut__, .__web-inspector-hide-shortcut__ * {
display: none !important;
function injectStyleRulejQ(rule, id) {
var div = $("<div />", {
html: '&shy;<style id=' + id + '>' + rule + '</style>'
shmdhussain / get-angular-controller-in-page.js
Last active Jan 29, 2018
Get angularjs controller in page print in console
View get-angular-controller-in-page.js
var controllers= document.querySelectorAll('[data-ng-controller]');
for(var j=0; j < document.querySelectorAll('[data-ng-controller]').length; j++){
var controllerName = controllers[j].getAttribute("data-ng-controller");"controller-"+(j+1));
shmdhussain / getCookie.js
Created Jan 6, 2018
Get javascript cookies in the console
View getCookie.js
function readCookie(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for(var i=0;i < ca.length;i++) {
var c = ca[i];
while (c.charAt(0)==' ') c = c.substring(1,c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
return null;
shmdhussain / sna-third-party-ref-url.js
Created Jan 6, 2018
View sna-third-party-ref-url.js
// Template
// =================
* jQuery Templates Plugin 1.0.0pre
* Requires jQuery 1.4.2
* Copyright Software Freedom Conservancy, Inc.
* Dual licensed under the MIT or GPL Version 2 licenses.
shmdhussain / select-dropdown-option-print.js
Created Jan 6, 2018
Get the Options HTMl of dropdown which is selected in debugger
View select-dropdown-option-print.js
var aa=[];
var htmlCont = $(this).html();
View add-script-body.js
/*START: Create Script Tag and append in last line of body*/
function addScript( src ) {
var s = document.createElement( 'script' );
s.setAttribute( 'src', src );
document.body.appendChild( s );
/*END: Create Script Tag and append in last line of body*/
shmdhussain / ellipsis.css
Created Jan 6, 2018
Ellipsis CSS -quick CSS
View ellipsis.css
@mixin ellipsis() {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
@mixin word-wrap() {
overflow-wrap: break-word;
word-wrap: break-word;
-ms-word-break: break-all;
word-break: break-word;
shmdhussain / enable-body-edit.js
Created Jan 6, 2018
make the whole body , content editable, useful for just changing the content in page for demo
View enable-body-edit.js
shmdhussain / debugger-timeout.js
Created Jan 6, 2018
Debugger timeout, when debugging mouse hover, run this in console, and check the mouse over actions
View debugger-timeout.js
}, 5000);
You can’t perform that action at this time.