to tell html to break a long word if it wants to, you need to add
donau<wbr>dampfs<wbr>chiff<wbr>fahrts<wbr>kapitäns<wbr>mütze
looks like this: donau
Devs at IST are sharing things
to tell html to break a long word if it wants to, you need to add
donau<wbr>dampfs<wbr>chiff<wbr>fahrts<wbr>kapitäns<wbr>mütze
looks like this: donau
if you are into text editors: try https://atom.io/!
if you are using turbolink there are links to sites where you might not want that turbolink is used.
you can prevent that by adding "data-turbolinks" => "false"
<%= link_to "link", "/link","data-turbolinks" => "false" %>
if you need to truncate tables and want to reset the autoincrement counter use this command
TRUNCATE TABLE someTable RESTART IDENTITY;
if you want to delete connected tables (e.g. via foreign key)
TRUNCATE TABLE someTable CASCASE;
of course this commands can be used sequenced.
if you want to rotate the display of your raspberry 7 inch touchscreen (with latest raspian) you need to do the following
sudo apt-get install xinput
xinput --list
xinput --set-prop 'FT5406 memory based driver' 'Coordinate Transformation Matrix' 0 -1 1 1 0 0 0 0 1
display_rotate=1 (for 90 degrees)
done!
if you want to have a quick look at calendar without leaving the terminal:
just type cal
and you see the current month
to see a whole year type cal 20xx
to see a specific month type cal 12 20xx
if you query a mysql database and ask for all rows that do not have a specific value in a specific field, you might expect to also get those rows where the field is null.
but this is not the case.
so if you want to get all rows you have to query all rows that do not have the specific value in this field or where this is field is null.
or in code
wrong:
select * from database where field not like '%value%'
right:
select * from database where field not like '%value%' or field is null
If you want the iframe of a site not of the same domain to transfer data to your parent site this is normally prohibited because of the potential security risk of cross domain access. So if you want to communicate you can send messages via javascript.
in iframe
$('.button').click(function(){window.top.postMessage('hello', '*');})
on parent site
window.onmessage = function(e){if (e.data == "hello") {alert('hello')}
this works the other way also.
If you want to show a text with all html formatting html_safe doesn’t work but this line of code
ActionView::Base.full_sanitizer.sanitize(@string)
ps aux | grep firefox
find process id of a process
find . -name '*firefox*'
find all filenames including firefox
dig -x 10.10.10.10
find information on ip address
history | grep x
find all command with x in your history
history -d 1234
delete command from history