Later Ctrl + ↑
 25   2 mon  

Fix issue with “Insert the picture” button in the Summernote

Summernote deactivates “Insert the picture” button when you use the context menu by mouse to insert the link.

You can use next code to fix this issue:

$('body').on('paste', '.note-image-url', function(e) {

    return false;
 37   2 mon  
 35   2 mon  

Fix: the text hides under the toolbar in Summernote

If you put several Summernote editors in Bootstrap tabs, then after navigating between tabs, the text in the editor hides under the toolbar. At the same time it is enough to scroll the page down or up and then everything falls into place.

We as users can patch it:

$('.yourSelector[data-toggle="tab"]').on('', function (e) {
 62   2 mon  

Fix: Option “disableDragAndDrop: true” doesn’t works in Summernote

In my case, this option doesn’t works:

    disableDragAndDrop: true // Не работает...

I think it is a summernote bug. Maybe it will be fixed in new versions or it has already fixed, but I don’t want to update editor now. Therefore I made a dirty hack in my code:

$('body').on('drop', '.note-editable', function() {
    return false;
 50   2 mon  

How to remove records from active connections and ip_conntrack by IP

Someone can opens hundreds tabs with autoupdate pages in browser and make lot of persistent open connections to the server. If you want to drop his connections, you have to find him at first:

sudo cat /proc/net/ip_conntrack | grep 'ESTABLISHED' | wc -l
sudo cat /proc/net/ip_conntrack | grep 'ESTABLISHED'
netstat -tulpan | grep 'ESTABLISHED' | wc -l
netstat -tulpan | grep 'ESTABLISHED'

If you found a lot of connections from one IP, check it: (Replace to necessary IP)

sudo cat /proc/net/ip_conntrack | grep 'ESTABLISHED' | grep '' | wc -l
netstat -tulpan | grep '' | wc -l

Look to the web server logs whether the activity is suspicious:

cat /var/log/nginx/access.log | grep ''

Then drop user connections:

sudo cutter
sudo conntrack -D conntrack --orig-src
sudo cat /proc/net/ip_conntrack | grep '' | wc -l
sudo cat /proc/net/ip_conntrack | grep 'ESTABLISHED' | wc -l
 69   2 mon  
 69   2 mon