Friday, December 8, 2017

Usefull Git Commands

# Revert changes to modified files.
git reset --hard


# Remove all untracked files and directories. (`-f` is `force`, `-d` is `remove directories`)
git clean -fd

Tuesday, December 5, 2017

How to Clear Form Content in modal, while close

$('#mymodalname').on('hidden.bs.modal', function () {
$(this)
    .find("input,textarea,select")
       .val('')
       .end()
    .find("input[type=checkbox], input[type=radio]")
       .prop("checked", "")
       .end();

})
</script>

Difference between hook_boot and hook_init Drupal

hook_boot() hook_init() hook_boot() will executes even on cached pages hook_init() will not executes on cached pages hook_boot() is ...