You will need to connect your phone first, using USB.
With the USB cable:
adb tcpip 5555
Find out the IP address of your phone
You will need to connect your phone first, using USB.
With the USB cable:
adb tcpip 5555
Find out the IP address of your phone
/* | |
* Tries to detects whether a given string is "Arabic" (or Farsi, Pashto, etc.) | |
* The detection is based on counting "Arabic alphabet" characters | |
* Returns true if the string is mostly made of "Arabic characters", false otherwise | |
* This is how to use on HTML element "el": | |
* detectArabic(el.innerText) | |
*/ | |
function detectArabic(string) { | |
try { |
This is tested for MySQL with Linux or OSX
I was in a situation where I had images saved into an SQL table, as "blobs" and needed to export them into proper jpg files.
This relies on the SQL syntax SELECT INTO DUMPFILE
. However this command can only export one row at a time.
Various commands
Follow this:
https://thomas-leister.de/en/mailserver-debian-stretch/
Notes: See this section DKIM is a single domain setup. For multiple domains we need multiple DKIM keys. In /etc/rspamd/local.d/dkim_signing.conf, we would rather need something like this (source):
path = "/var/lib/rspamd/dkim/$domain.$selector.key";
... to place markers on a map.
This code runs in the browser debugging console.
I parse this page to extract geographical coordibates for major cities:
https://en.wikipedia.org/w/index.php?title=List_of_cities_by_longitude&printable=yes
Just open this page in your browser, launch your debugging console and get ready to copy-paste.
Sometimes drop-down or contextual menus appear at the wrong position on the screen. | |
Upon moving the parent window, it appears that the menu position is not updated. They still appear at the same position. | |
To reproduce with affected applications, open app, open drop-down menu, move app window, open same drowpdown menu - observe that the menu has not moved with the window and is subsequently now appearing at a wrong position. | |
If the window is resized, the menus get re-aligned. | |
Weston 3.0.0 | |
(running in DRM mode) | |
There is such a bug in sway too. But over there it seems to affect everything (pcmanfm, lxterminal, subl, chromium...) |
/** | |
* Minimal drag-move code. | |
* https://jsfiddle.net/rolfen/68bg5ggw/ | |
* | |
* @param ele {HTMLElement} the container element to drag | |
* @param triggers {Array} One or more "drag triggers", areas (inside ele) that will trigger the drag functionality when clicked on. | |
* @param onDragStart {function} Called when dragging starts (trigger is grabbed) | |
* @param onDragEnd {function} Called when dragging ends (trigger is released) | |
* | |
* Issues: |
- Side effects (usually unwanted) | |
- Sometimes impractical: eg: vertical-align | |
- Sometimes too high level / opinionated and inflexible (related to all of above) | |
- Cascading - most of the inhertiance is unwanted | |
- Global-variable-like issues | |
- Overriding | |
__Improvements | |
I think it would be an important improvement, to be able to compound CSS blocks. A bit like less mixins, but at a native level. At the moment, if we are not using a pre-processor, we have to add multiple classes on elements (eg: <div class="col-2 pad-1 size-3">). That is neither powerful nor semantic. |
// override XMLHttpRequest | |
// source: https://gist.github.com/icodejs/3183154 | |
var open = window.XMLHttpRequest.prototype.open, | |
send = window.XMLHttpRequest.prototype.send; | |
function openReplacement(method, url, async, user, password) { | |
return open.apply(this, arguments); | |
} |