JavaScript Snippet – Google’s Hebrew-Keyboard Component

(function() { google.elements.keyboard.loadme({id:"he",title:"\u05e2\u05b4\u05d1\u05b0\u05e8\u05b4\u05d9\u05ea",direction:"rtl",mappings:{"":{"":";1234567890-=/'\u05e7\u05e8\u05d0\u05d8\u05d5\u05df\u05dd\u05e4][\\\u05e9\u05d3\u05d2\u05db\u05e2\u05d9\u05d7\u05dc\u05da\u05e3,\u05d6\u05e1\u05d1\u05d4\u05e0\u05de\u05e6\u05ea\u05e5."},s:{"":'~!@#$%^&*)(_+QWERTYUIOP}{|ASDFGHJKL:"ZXCVBNM<>?'},l:{"":";1234567890-=QWERTYUIOP][\\ASDFGHJKL;'ZXCVBNM,./"},sl:{"":"\u05b0\u05b1\u05b2\u05b3\u05b4\u05b5\u05b6\u05b7\u05b8\u05c2\u05c1\u05b9\u05bc/'\u05e7\u05e8\u05d0\u05d8\u05d5\u05df\u05dd\u05e4][\u05bb\u05e9\u05d3\u05d2\u05db\u05e2\u05d9\u05d7\u05dc\u05da\u05e3,\u05d6\u05e1\u05d1\u05d4\u05e0\u05de\u05e6\u05ea\u05e5."},
"c,sc,cl,scl":{"4m":"\u20aa\u05bf",EU:"\u20ac\u05f0",HJ:"\u05f2\u05f1"}}}); })()
(function () {
  google.elements.keyboard.loadme({
    id: "he"
    , title: "\u05e2\u05b4\u05d1\u05b0\u05e8\u05b4\u05d9\u05ea"
    , direction: "rtl"
    , mappings: {
      "": {
        "": ";1234567890-=/'\u05e7\u05e8\u05d0\u05d8\u05d5\u05df\u05dd\u05e4][\\\u05e9\u05d3\u05d2\u05db\u05e2\u05d9\u05d7\u05dc\u05da\u05e3,\u05d6\u05e1\u05d1\u05d4\u05e0\u05de\u05e6\u05ea\u05e5."
      }
      , s: {
        "": '~!@#$%^&*)(_+QWERTYUIOP}{|ASDFGHJKL:"ZXCVBNM<>?'
      }
      , l: {
        "": ";1234567890-=QWERTYUIOP][\\ASDFGHJKL;'ZXCVBNM,./"
      }
      , sl: {
        "": "\u05b0\u05b1\u05b2\u05b3\u05b4\u05b5\u05b6\u05b7\u05b8\u05c2\u05c1\u05b9\u05bc/'\u05e7\u05e8\u05d0\u05d8\u05d5\u05df\u05dd\u05e4][\u05bb\u05e9\u05d3\u05d2\u05db\u05e2\u05d9\u05d7\u05dc\u05da\u05e3,\u05d6\u05e1\u05d1\u05d4\u05e0\u05de\u05e6\u05ea\u05e5."
      }
      , "c,sc,cl,scl": {
        "4m": "\u20aa\u05bf"
        , EU: "\u20ac\u05f0"
        , HJ: "\u05f2\u05f1"
      }
    }
  });
})()
(function () {
  google.elements.keyboard.loadme({
    id: "he"
    , title: "עִבְרִית"
    , direction: "rtl"
    , mappings: {
      "": {
        "": ";1234567890-=/'קראטוןםפ][\\שדגכעיחלךף,זסבהנמצתץ."
      }
      , s: {
        "": '~!@#$%^&*)(_+QWERTYUIOP}{|ASDFGHJKL:"ZXCVBNM<>?'
      }
      , l: {
        "": ";1234567890-=QWERTYUIOP][\\ASDFGHJKL;'ZXCVBNM,./"
      }
      , sl: {
        "": "ְֱֲֳִֵֶַָֹּׁׂ/'קראטוןםפ][ֻשדגכעיחלךף,זסבהנמצתץ."
      }
      , "c,sc,cl,scl": {
        "4m": "₪ֿ"
        , EU: "€װ"
        , HJ: "ײױ"
      }
    }
  });
})()

Minimal Base64 With Unicode Support

btoa(unescape(encodeURIComponent("א")))
===> btoa("א")
===> "15A="

decodeURIComponent(escape(atob("15A=")))
===> decodeURIComponent(escape("א"))
===> "א"

Faster YouTube

Add the following adblock/uBlock origin rules:

Block rules

googleapis.com/youtubei/v1/log_interaction
youtube.com$beacon,important
youtube.com*adunit
youtube.com/*/log_interaction
youtube.com/annotation
youtube.com/api/stats
youtube.com/api/stats/ads
youtube.com/feed_change
youtube.com/feed_change_ajax
youtube.com/pagead
youtube.com/ptracking
youtube.com/share_ajax
ytimg.com/yts/img/favicon
ytimg.com/yts/img/pixel
yts.ag/images/vpn*
doubleclick.net
s.youtube.com
/generate_204
/gen_204
/pixel

And add those hide rules too :

youtube-nocookie.com,youtube.com##.logo.doodle, .ytp-title-channel-logo, [class*="promo"], [class*="related-channel"], [class*="ytp-ad"], [id*="-ads"], [id*="ad_"], [id^="feed-main"] > ol:nth-of-type(1) > li:nth-of-type(1), [id^="header"] > [id^="video-masthead"], [id^="watch-action-panels"]

It will keep all of YouTube’s core functions,
eliminating ads, statistics, beacons and analytic-requests.

Making Your YouTube Super Fast!

Don’t Use Chrome Command-Line Switch `enable-gpu-memory-buffer-compositor-resources` It Will Break Your HTML5 Videos!

For Chrome/Chromium.

When you “talk to the video-renderer”, to specify that all compositor resources should be backed by GPU memory buffers,
You use the “feature flag” --enable-gpu-memory-buffer-compositor-resources,
while good for various developing aspects, it will show you green video screen instead of the video (on YouTube).

Please do not use it for now.

Make Chrome Faster

1. Use Chrome/Chromium Of x64bit, if your machine can handle it.

2. Install those both official Chrome-extensions:
https://chrome.google.com/webstore/detail/dalkfakmooljfejnddeaibdkgbbogpea
https://chrome.google.com/webstore/detail/pcgokfnmpaefeofjpbicabmcadpcnhon

3. Access chrome://flags/ and change the following values,
you may easily reach either of those by copy&&paste them into the address-bar.

👉 chrome://flags/#num-raster-threads ➧4
👉 chrome://flags/#default-tile-width ➧1024
👉 chrome://flags/#default-tile-height ➧1024

👉 chrome://flags/#enable-fast-unload ➧Enable
👉 chrome://flags/#smooth-scrolling ➧Disable
👉 chrome://flags/#enable-quic ➧Enable
👉 chrome://flags/#enable-zero-copy ➧Enable
👉 chrome://flags/#enable-site-per-process ➧Enable
👉 chrome://flags/#v8-cache-options ➧’Cache V8 parser data.’
👉 chrome://flags/#v8-cache-strategies-for-cache-storage
➧’Aggressive’
👉 chrome://flags/#enable-scroll-anchoring ➧Disable
👉 chrome://flags/#enable-pointer-events ➧Enable
👉 chrome://flags/#passive-listener-default ➧’Force All True’
👉 chrome://flags/#document-passive-event-listeners ➧Enable
👉 chrome://flags/#passive-event-listeners-due-to-fling ➧Enable
👉 chrome://flags/#expensive-background-timer-throttling ➧Enable
👉 chrome://flags/#enable-nostate-prefetch ➧’Enabled Prerender’
👉 chrome://flags/#enable-resource-prefetch ➧’Enable Prefetching’
👉 chrome://flags/#delay-navigation ➧Disable

4. Just before the restart required in stage [3] (above),
close all other tabs (other than chrome://flags/),
access chrome://net-internals/#dns in a new-tab, and click the ‘clear host cache’, you can safely close the chrome://net-internals/#dns now, and back in the chrome://flags/ click on the big-blue ‘relaunch now’ button.

5. Run Chrome with the following command-line switches:

--enable-accelerated-vpx-decode="0x03" --prefetch-search-results --disable-pinch --disable-in-process-stack-traces --enable-tcp-fastopen --enable-threaded-compositing --enable-gpu-scheduler --use-double-buffering --enable-hardware-overlays --enable-partial-raster --disable-speech-api --ipc-connection-timeout="90"  --enable-gpu-memory-buffer-compositor-resources --enable-gpu-memory-buffer-video-frames --enable-native-gpu-memory-buffers --disable-payment-request --disable-3d-apis --disable-logging --disable-presentation-api --enable-rgba-4444-textures --v8-cache-options="data" --v8-cache-strategies-for-cache-storage="aggressive"

you may use a .bat or .cmd batch file if it is easier for you,
or use my https://github.com/eladkarako/iniRun project.
here is my ini file (for chromium :])

[Information]
Parent_Folder=C:\Users\Elad\AppData\Local\Chromium\Application

Arguments=--force-device-scale-factor="1.2" --enable-accelerated-vpx-decode="0x03" --allow-outdated-plugins --ppapi-flash-path="C:\Windows\System32\Macromed\Flash\PEPFLA~1.DLL" --ppapi-flash-version="24.0.0.221" --prefetch-search-results --enable-lcd-text --enable-font-antialiasing=1 --ppapi-antialiased-text-enabled=1 --no-referrers --reduced-referrer-granularity --force-ui-direction=ltr --enable-pepper-testing --keep-alive-for-test --disable-pinch --ipc-connection-timeout="90" --disable-hang-monitor --disable-in-process-stack-traces --enable-tcp-fastopen --enable-threaded-compositing --enable-grouped-history --ash-md=enabled --material-design-ink-drop-animation-speed="fast" --show-md-login --top-chrome-md="material" --secondary-ui-md="material" --enable-gpu-scheduler --show-md-login --disable-md-oobe --use-double-buffering --desktop-window-1080p --enable-hardware-overlays --enable-partial-raster --disable-speech-api --enable-gpu-memory-buffer-compositor-resources --enable-gpu-memory-buffer-video-frames --enable-native-gpu-memory-buffers --disable-payment-request --disable-3d-apis --disable-logging --disable-presentation-api --enable-rgba-4444-textures --v8-cache-options="data" --v8-cache-strategies-for-cache-storage="aggressive" --enable-threaded-compositing --no-referrers


;;// Overrides the timeout, in seconds, that a child process waits for a
;;// connection from the browser before killing itself.
;;const char kIPCConnectionTimeout[]          = "ipc-connection-timeout";


Full_Path=C:\Users\Elad\AppData\Local\Chromium\Application\chrome.exe

Run_Mode=SW_SHOWMAXIMIZED

search this blog for newer ways to download all recent command-line switches and this might also help: https://github.com/eladkarako/Chrome-Command-Line-Switches :]

Enjoy!

Google Message :] *Sign* RGBA_4444 Textures Still Does Not Works Perfectly…

Update: Working! You are welcome to try it yourself,
in your Chrome/Chromium browser: --enable-rgba-4444-textures.


If you’re having N7v2 or N10 it will still break..
so by default it is set to disable flag on new Chrome/Chromium versions…

If you so choose to enable it,
You’ll see a ren. message (From N10)

I/chromium( 2104): [INFO:CONSOLE(0)] "[.WebGLRenderingContext]RENDER WARNING: texture bound to texture unit 0 is not renderable. It maybe non-power-of-2 and have incompatible texture filtering or is not 'texture complete'", source: file:///sdcard/clanktemp/index.html (0)

I like the helpful logs,
those whom are addressing you are a thinking person,
and suggest *things* :]

WebSocket Killer – For Real!

Yet another useful Chrome-extension,

it workarounds the limitation of Chrome,
forbidding setting the WebSocket object to undefined by running the code,
from within the web-page, and not by proxy from the extension.
It does so by obfuscating (just a little bit) the code, running it as BASE64.

you can download it, pack it using chrome’s extension page (developers mode),
and drag-and-drop the crx on to the extensions page to install it.

https://github.com/eladkarako/Chrome-Extension-Socket-Killer

For now, only available (premium version and FOR FREE!) through github and not from Google-store :]

JavaScript Ninja – Fake “Native-Code” – For Function’s toString, A.K.A: Obfuscation Magic Helper

The magic is really just using styles to mimic the style used by Chrome’s console output.

console.log(“%cfunction ” + “%ctoString() { [native code] }”, “font-style:italic; color:rgb(180,42,158);”, “font-style:italic;”)

may be required slightly different styling,
and “per browser” styling on different browsers to
mimic the “native code” a.k.a “don’t debug me”, more complete :]

Google Accounts, And The New Non-Standard Placeholder – And How To Remove It!

This might bug you when typing:

Since its transition up/down is not perfect,
and it covers the real, native, input element.

If you’re having uBlock origin, simply add the rule:
google.com##input[type^="password"] + div[jsname][aria-hidden]

Notes:
– perfectly safe.
– due to a parsing bug don’t use [type="password"] but partial-match (*,^ or $).
– you can make it as generic as you’ll like:
google.com##input + [jsname][aria-hidden] to fix it for other input types
google.com##input + [aria-hidden]
or even ##input + [aria-hidden] will do just fine, since aria-hidden are purely informational, so they can be safely be hidden (display:none as is..) or even totally removed!


In-fact, scratch that!.

The elements are still buggy and focus-stealing unless removed from the DOM,
which sadly can not be done with uBlock/AdBlock (those will simply just hide it..)

You better download the Google Chrome-extension:
https://chrome.google.com/webstore/detail/dhgdpjkcnjbcdlhlmlogepplbicplmdm

Block Sockets? Ask Me How!

This Little Chrome Extension: https://github.com/eladkarako/Chrome-Extension-Socket-Killer
Acts As A Socket-Firewall, Blocking WebSocket Connections, Even Before Connecting!
As A Bonus, It Also Null’ifies The WebSocket Object-Constructor :]

Blocking websockets, prevents the next-gen. ads from infiltrating your- presumingly ads-protected, browser.

It will also improve your Ad-Blocking extensions, catching most ads, blocking more connections, etc..

Enjoy.

JavaScript Ninja – NamedNodeMap, But Flat!

Given the following HTML-code, describing some sort of an element (a lazy-load image in that case..)

<img class="w" data-frz-src="/th_B2BB13CEF623A7F1D2F82B8D2014C030FFD3128A_4.jpg" src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" onload="lzld(this)" onerror="lzld(this)">

Serialising or looping through its attributes, although feasible, will be quite a pain, handling with NamedNodeMap unnesessary-complicated object structure.


This code:

NamedNodeMap.prototype.map = Array.prototype.map;

var a = document.querySelectorAll('img[src^="data"][src*="base64"]')[0];

a.attributes.map(function(attribute){
  return {name: attribute.nodeName, value:attribute.nodeValue};
});

Will lower-the-lovel of complexity, and will give you an array of name,value objects (much less pain in the ass to serialise, or loop through), but it is not very useful if you are looking for something specific..

[{
    "name": "class"
  , "value": "w"
}, {
    "name": "data-frz-src"
  , "value": "/th_B2BB13CEF623A7F1D2F82B8D2014C030FFD3128A_0.jpg"
}, {
    "name": "src"
  , "value": "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="
}, {
    "name": "onload"
  , "value": "lzld(this)"
}, {
    "name": "onerror"
  , "value": "lzld(this)"
}]

This code, will flat the attributes to something more readable,
a plain key,value object, where (matching the HTML logic anyway..) each key
matches to a unique attribute-name – and its value.

NamedNodeMap.prototype.reduce = Array.prototype.reduce;

var a = document.querySelectorAll('img[src^="data"][src*="base64"]')[0];

a.attributes.reduce(function(structure, attribute){
  structure[attribute.nodeName] = attribute.nodeValue;
  return structure;
},{});
{
    "class": "w"
  , "data-frz-src": "/th_B2BB13CEF623A7F1D2F82B8D2014C030FFD3128A_0.jpg"
  , "src": "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="
  , "onload": "lzld(this)"
  , "onerror": "lzld(this)"
}

An ultimate way of just allowing to get at any given time the key/value object (above),
is by adding a prototype method, into NodeHTMLElement:

HTMLElement.prototype.getAttributes = function(){
  var me = this;
  return Array.prototype.map.call(me.attributes, function(attribute){
    return {name: attribute.nodeName, value:attribute.nodeValue};
  });
})

So you could just do a ...querySelector(...).getAttributes(),
to get just the array of the keys, simply go with Object.keys( ...querySelector(...).getAttributes() ).

Feature-Policy Header

Very early draft, but newest Chrome/Chromium will show warnings,
if you do not allow the use of those features.

Also, you probably need to activate handling this new, draft feature in your Chrome’s flags-section: chrome://flags/#enable-feature-policy, otherwise Chrome will probably ignore any directives..
Either from HTTP-headers or iframe attributes… and will apply the simple can/can’t logic (for example, vibration enabled only when inside a user-click handle method, etc..) .

Here is an Apache snippet to add a few useful features:

#feature policy
<ifModule mod_headers.c>
  Header set Feature-Policy '{"vibrate":["*"],"geolocation":["*"],"fullscreen":["*"]}'
</ifModule>

read more: https://github.com/WICG/feature-policy

For iframes you should either use the same format of JSON-like,
or a simpler one that uses enable attribute, still not 100% set.

you may specify both for now, and best to allow them with sandbox too (more secure):

<iframe src="https://..." sandbox="allow-forms allow-modals allow-orientation-lock allow-pointer-lock allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts allow-top-navigation" seamless="false" featurepolicy='{"vibrate":["*"],"geolocation":["*"],"fullscreen":["*"]}' enable="vibrate geolocation fullscreen"></iframe>

Continue reading

JavaScript Ninja – Crowd Wisdom eBay Enhancements

Making eBay Buying Safer, Using Wisdom Of The Crowd.

Protect Yourself Against:
– Untrustworthy sellers
Those will accept your money but will not send you anything.
– Bad-reputation sellers
without checking out their feedbacks.
– New and inexperienced sellers
without researching their profile.

– Only trust sellers with “a lot of buyers”.
– Avoid items with overpriced shipping.
– Sort by “number of sold items” – in additional to current sorted results.
Continue reading

Adding ‘Noto Mono’, ‘Courier New’, ‘Droid Sans Mono’, ‘Roboto Mono’, ‘Ubuntu Mono’ To Windows’ CMD

Just make sure you have those (you can google-search them or look for them at fonts.google.com, the ‘Courier New’ font-face should be already installed in your Windows).

feel free to edit/replace/add more,
make sure the fonts are mono-type, use ‘000…00’ as name.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Console\TrueTypeFont]
"000"="Noto Mono"
"0000"="Courier New"
"00000"="Droid Sans Mono"
"000000"="Roboto Mono"
"0000000"="Ubuntu Mono"

If you don’t know of name of the font (it should be exactly right!),
open any program that does some sort of font selection, and allows copy&paste, such as Microsoft-Word or even Notepad2/Notepad++.

Notepad2 has a “default font” selection, which I’m not going to actually change, but just use it to browse-for font-names.

the standard control-panel, used by most (simple) does also allow easy copy&paste.

Hebrew Nikud, Using Unicode!

Easy copy&&paste of Hebrew letters with Nikud (extended), including the Hebrew letters
which can be useful for lack of Hebrew keyboard.

here is the real page you can play with

or visit the open-source project at https://www.github.com/eladkarako/nikud/, and report issues or suggest ideas at https://www.github.com/eladkarako/nikud/issues/

You can write using yours (or using the given letters) and add Nikud, following with copy&&paste into various applications that support Unicode, for example: whatsapp!

Enjoy!

Hebrew Unicode-Range

U+05BE,U+05C0,U+05C3,U+05C6,U+0591-U+05C7,U+05D0-U+05EA,U+05F0-U+05F4,U+FB1D-U+FB36,U+FB38-U+FB3C,U+FB3E,U+FB40-U+FB41,U+FB43-U+FB44,U+FB46-U+FB4F
U+05B0-U+05B9,U+05BB-U+05BC,U+05C1-U+05C2

Updated to latest Unicode (v9.0)
https://en.wikipedia.org/wiki/Unicode_and_HTML_for_the_Hebrew_alphabet
https://en.wikipedia.org/wiki/Hebrew_(Unicode_block)

The Unicode-range of each-letter

U+0591: HEBREW ACCENT ETNAHTA
U+0592: HEBREW ACCENT SEGOL
U+0593: HEBREW ACCENT SHALSHELET
U+0594: HEBREW ACCENT ZAQEF QATAN
U+0595: HEBREW ACCENT ZAQEF GADOL
U+0596: HEBREW ACCENT TIPEHA
U+0597: HEBREW ACCENT REVIA
U+0598: HEBREW ACCENT ZARQA
U+0599: HEBREW ACCENT PASHTA
U+059A: HEBREW ACCENT YETIV
U+059B: HEBREW ACCENT TEVIR
U+059C: HEBREW ACCENT GERESH
U+059D: HEBREW ACCENT GERESH MUQDAM
U+059E: HEBREW ACCENT GERSHAYIM
U+059F: HEBREW ACCENT QARNEY PARA

U+05A0: HEBREW ACCENT TELISHA GEDOLA
U+05A1: HEBREW ACCENT PAZER
U+05A2: HEBREW ACCENT ATNAH HAFUKH
U+05A3: HEBREW ACCENT MUNAH
U+05A4: HEBREW ACCENT MAHAPAKH
U+05A5: HEBREW ACCENT MERKHA
U+05A6: HEBREW ACCENT MERKHA KEFULA
U+05A7: HEBREW ACCENT DARGA
U+05A8: HEBREW ACCENT QADMA
U+05A9: HEBREW ACCENT TELISHA QETANA
U+05AA: HEBREW ACCENT YERAH BEN YOMO
U+05AB: HEBREW ACCENT OLE
U+05AC: HEBREW ACCENT ILUY
U+05AD: HEBREW ACCENT DEHI
U+05AE: HEBREW ACCENT ZINOR
U+05AF: HEBREW MARK MASORA CIRCLE

U+05B0: HEBREW POINT SHEVA
U+05B1: HEBREW POINT HATAF SEGOL
U+05B2: HEBREW POINT HATAF PATAH
U+05B3: HEBREW POINT HATAF QAMATS
U+05B4: HEBREW POINT HIRIQ
U+05B5: HEBREW POINT TSERE
U+05B6: HEBREW POINT SEGOL
U+05B7: HEBREW POINT PATAH
U+05B8: HEBREW POINT QAMATS
U+05B9: HEBREW POINT HOLAM
U+05BA: HEBREW POINT HOLAM HASER FOR VAV
U+05BB: HEBREW POINT QUBUTS
U+05BC: HEBREW POINT DAGESH OR MAPIQ
U+05BD: HEBREW POINT METEG
U+05BE: HEBREW PUNCTUATION MAQAF
U+05BF: HEBREW POINT RAFE

U+05C0: HEBREW PUNCTUATION PASEQ
U+05C1: HEBREW POINT SHIN DOT
U+05C2: HEBREW POINT SIN DOT
U+05C3: HEBREW PUNCTUATION SOF PASUQ
U+05C4: HEBREW MARK UPPER DOT
U+05C5: HEBREW MARK LOWER DOT
U+05C6: HEBREW PUNCTUATION NUN HAFUKHA
U+05C7: HEBREW POINT QAMATS QATAN

U+05D0: HEBREW LETTER ALEF
U+05D1: HEBREW LETTER BET
U+05D2: HEBREW LETTER GIMEL
U+05D3: HEBREW LETTER DALET
U+05D4: HEBREW LETTER HE
U+05D5: HEBREW LETTER VAV
U+05D6: HEBREW LETTER ZAYIN
U+05D7: HEBREW LETTER HET
U+05D8: HEBREW LETTER TET
U+05D9: HEBREW LETTER YOD
U+05DA: HEBREW LETTER FINAL KAF
U+05DB: HEBREW LETTER KAF
U+05DC: HEBREW LETTER LAMED
U+05DD: HEBREW LETTER FINAL MEM
U+05DE: HEBREW LETTER MEM
U+05DF: HEBREW LETTER FINAL NUN

U+05E0: HEBREW LETTER NUN
U+05E1: HEBREW LETTER SAMEKH
U+05E2: HEBREW LETTER AYIN
U+05E3: HEBREW LETTER FINAL PE
U+05E4: HEBREW LETTER PE
U+05E5: HEBREW LETTER FINAL TSADI
U+05E6: HEBREW LETTER TSADI
U+05E7: HEBREW LETTER QOF
U+05E8: HEBREW LETTER RESH
U+05E9: HEBREW LETTER SHIN
U+05EA: HEBREW LETTER TAV

U+05F0: HEBREW LIGATURE YIDDISH DOUBLE VAV
U+05F1: HEBREW LIGATURE YIDDISH VAV YOD
U+05F2: HEBREW LIGATURE YIDDISH DOUBLE YOD
U+05F3: HEBREW PUNCTUATION GERESH
U+05F4: HEBREW PUNCTUATION GERSHAYIM

A bidirectional font-faces that are Hebrew-capable:

Alef, 'SBL BibLit', 'SBL Hebrew', 'David CLM', 'Frenk Ruehl CLM', 'Hadasim CLM', Cardo, Shofar, David, 'Ezra SIL', 'Ezra SIL SR', 'Noto Sans Hebrew', FreeSerif, 'Times New Roman', FreeSans, Arial;

You can use the following snippet to load-up a font-face with spefic “by letter support” (Noto Sans, in-this case..)

/* hebrew */
@font-face {
  font-family: 'Noto Sans Hebrew';
  font-style: normal;
  font-weight: 400;
  src: local('Noto Sans Hebrew'), local('NotoSansHebrew'), url(https://fonts.gstatic.com/s/notosanshebrew/v5/QZOobcJ7ccckcnN4idgy78ymZCRHoYBsRD5MU0Qw5G8.woff2) format('woff2');
  unicode-range: U+0590-05FF, U+20AA, U+25CC, U+FB1D-FB4F;
}

*note that you might want to edit the range to match the above range, this is “as is from Google..”.

and later simply add the Noto-Sans-Hebrew in-front of the definition to every-element, it will handle exclusively just the Hebrew content, will fallback to Noto-Sans for the other latin characters whom it won’t have built-in-glyph-support.

for example:

*{ font-family: 'Noto Sans Hebrew', 'Noto Sans', sans-serif; }

Stuff You Should Exclude From Your Anti-Virus

It should be perfectly safe to exclude some folders from your anti-virus processing.
Have a look below, my notes/comments should help you understand the generic state-of mind and then you can apply the same reasoning to modify or add other items.

Continue reading

NodeJS Snippet – File Access/Modification Stat And Utimes One-Second Scope

You might get a high-precision (milliseconds) from the file-stat,
but you have to use a lower-resolution value, for utimes.

It is got to do with internal-linking to the operation-system’s libs..

but here is a nice working example for you to play-with,
essentially just reading a file’s content and last-modification/last-access times,
and rewrite the file (delete/write new one) with some altered-content,
but restoring the timestamp of the original file.

for this example to work just place a text file named file.txt, with any content, and any timestamp (you can set timestamp manually using variety of programs..), and see that the file with the new content is keeping its timestamp after-all.

/* Working With NodeJS' `utimes` and `stat`.*/
var fs      = require('fs')
   ,path    = require('path')
   ,file    = path.resolve('./file.txt')     //will work on every OS (even though it is a "Unix-slash").
   ,stat    = fs.lstatSync(file)             //preform any action on symbolic-link itself. (for example unlink, to delete a symbolic-link without following it to delete the actual file)
 //,stat    = fs.statSync(file)              //follow symbolic-link to where it points, file might be placed in another folder!
   ,content
   ;

content = fs.readFileSync(file, {encoding: "utf8"});
content = content.replace(/foo/g, "bar") + "\nSome Junk...";

fs.unlinkSync(file);
fs.writeFileSync(file, content, {encoding: "utf8"});

fs.utimesSync(file, stat.atime.getTime()/1000, stat.mtime.getTime()/1000); //will restore the access/modification time of the original-file.

/*
.atime                access time
.mtime                modification time
.birthtime || .ctime  creation time     */

You can read about this issue on:
https://github.com/nodejs/node/issues/2069#issuecomment-294596104.

CSS Snippet – The Magical Rotated Logo

Wish to place a logo that will be rotated 360-degrees back-and-forth gently on mouse-hover?

Here is your example.
right click it and select view frame’s-source to see the code behind it.

Using transition to transform the logo to rotate 360 degrees, is lovely,
but it is a one way animation-
– If you wish to keep on the movement as long the mouse-is-hovered upon the logo,
using keyframe-animation is the way to go.

right click it and select view frame’s-source to see the code behind it.

This would probably render an even higher-quality result,
since keyframe-animation uses, unambiguously, the GPU to render frames smoothly,
You can prefer the use of keyframe-animation in-favor of transition, or at-least use it in the same way, by specifying that the animation should repeat only one time.

Weirdly the ease-in-out effect, when a user no-longer hover the logo, and the animation is then rendered backward, back to the zero-position, seems to only work when using simple transition :/

Nevermind.. :]

PHP Snippet – Close Connection With A Non-Standard HTTP-Status

Send header Connection: close using <?php header('Connection: close');?> is simple enough.
When using a non-standard HTTP-status, make sure to put its definition (through header) first.

Here is the correct way of doing it:

<?php
header('HTTP/1.1 418 I\'m a teapot', true);
header("Connection: close");
?>

You’ll want to specify the HTTP-status, in-full,
in the example above I’m using the 418 I'm a teapot,
RFC2324 – Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) which, is a joke HTTP-status.

And although it is very much a real HTTP-status, you can not normally just put it at the end of header('Connection: closed', true, 418), since it will apparently won’t be parsed correctly and simply return an error 500..

So to make sure it is 100% supported, always send the HTTP-status using header, unambiguously.

Some older Apache server will probably try to gzip-compress your response,
this can be also quickly avoided by flushing the output-buffer and specifying a zero-length content:

<?php
while(ob_get_level()>0){@ob_end_flush();}
header('HTTP/1.1 418 I\'m a teapot', true);
header("Content-Encoding: none");
header("Content-Length: 0");
header("Connection: close");
?>

Actually when I’m thinking about it,
maybe you better even use HTTP 1.0 in the response,
since keep-alive is pretty much a given fact in HTTP 1.1 (unless declared otherwise).

So this might be a better way utilising it:

<?php
while(ob_get_level()>0){@ob_end_flush();}
header('HTTP/1.0 418 I\'m a teapot', true);
header("Content-Encoding: none");
header("Content-Length: 0");
header("Connection: close");
?>

Ps.
If you wish to set the HTTP version dynamically, without messing with it, just replace the correct line in the code above with this one:
header(filter_input(INPUT_SERVER, "SERVER_PROTOCOL", FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION) . ' 418 I\'m a teapot');.

HTML5 – Remove 300ms Delay On-Touch/Click – No JavaScript Required!

  1. Include a viewport tag in the <HEAD> with specific width definition.
    You may specify a minimal-one: <meta name="viewport" content="width=device-width"/>
    or a bit more complex one with initial-scale: <meta name="viewport" content="height=device-height,width=device-width,initial-scale=1.0,minimum-scale=1.0,minimal-ui"/> (you may forbid zooming/re-scale by also adding ,user-scalable=no which will slightly improve overall performances and rendering speed).
  2. Second *thing* is to instruct the page to disable double-tap gesture, it is an official technique, recommended by Mozilla/Google.

    /*`manipulation`
     * Enable panning and pinch zoom gestures, 
     * but disable additional non-standard gestures
     * such as double-tap to zoom. Disabling double-tap 
     * to zoom removes the need for browsers to delay 
     * the generation of click events
     * when the user taps the screen. This is an alias 
     * for "pan-x pan-y pinch-zoom"
     * (which, for compatibility, is itself still valid).
     */
    html{
      touch-action: pan-x pan-y pinch-zoom;
      touch-action: manipulation;
    }
    

    The above rule will be compatible with all the browsers you can think of (yes IE too), and will not require setting any onclick/ontouchstart/ontouchend/etc.. hooking events, neither halt event-bubbling.

    As always with those html-set-rules, you better put the rule-block pretty early in-your CSS-file, you you may have an option to override the touch-action rule with a different value to a specific node, a good place is probably right-after the ‘css-clear/zero code’ at the start of the file.

Java And UTF-8

java -Dfile.encoding=UTF-8

working with Windows’ console/batch file? make sure to also change the code-page using chcp:

chcp 65001
.....\java.exe -Dfile.encoding=UTF-8 .......

Continue reading

Unofficial ApkTool 🔧

Bleeding-edge builds of ApkTool.

📥 Download Version 2.2.3-118094-SNAPSHOT (11.61MB)

ApkTool uses smali and baksmali internally, and already includes them (along with few other libs).
You can the latest download links at the public maven repository: smali, baksmali, dexlib2, util, snakeyaml

– about smali: https://github.com/JesusFreke/smali

– latest smali binaries can (also) be found here: https://bitbucket.org/JesusFreke/smali/downloads/

– ApkTool’s XDA-blog-thread: https://forum.xda-developers.com/showthread.php?t=1755243

– how to build the latest ApkTool: iCompile – Build ApkTool

ExifTool – Ultimate Batch To Remove All Tags, From Infinite List Of Files, With Verbose Status And Progress Report

ExifTool is a free and open-source software program for reading, writing, and manipulating image, audio, video, and PDF metadata. It is platform independent, available as both a Perl library (Image::ExifTool) and command-line application. ExifTool is commonly incorporated into different types of digital workflows and supports many types of metadata including Exif, IPTC, XMP, JFIF, GeoTIFF, ICC Profile, Photoshop IRB, FlashPix, AFCP and ID3, as well as the manufacturer-specific metadata formats of many digital cameras.

http://www.sno.phy.queensu.ca/~phil/exiftool/
https://en.wikipedia.org/wiki/ExifTool
https://sourceforge.net/projects/exiftool/
https://downloads.sourceforge.net/project/exiftool/exiftool-10.48.zip?r=&ts=1491744058&use_mirror=netix

The following example is a batch for Windows operation-system, but it can be easily migrated to any other supported OS, to use it, just mark a bunch of files (any amount! it does not limited to usual batch-queue-limit of 9) and drag&drop them over the batch-file.

Plus it will work on any file, naturally file-types that are not supported by the ExifTool will be ignored (skipped), so feel free to just use [CTRL]+[A] to select all the files without pin-point-select just the ones you need.. or unsure if they will be supported, if it will, it will.. and if it won’t, it won’t.. :]

remove_metadata.cmd:

@echo off
:LOOP
::has argument ?
if ["%~1"]==[""] (
  echo done.
  goto END;
)
::argument exist ?
if not exist %~s1 (
  echo not exist
  goto NEXT;
)
::file exist ?
echo exist
if exist %~s1\NUL (
  echo is a directory
  goto NEXT;
)
::OK
echo is a file

set FILE_INPUT="%~s1"
set FILE_OUTPUT="%~d1%~p1%~n1_fixed%~x1"

call exiftool -progress -verbose -ignoreMinorErrors -XMPToolkit="" -all="" -trailer:all="" "%FILE_INPUT%"


:NEXT
shift
goto LOOP

:END
pause

Nice Scrollbars

Those bulky scrollbars with the useless ‘arrows’
are mostly the cause of large-font in compare to a low(er) screen-resolution.

The up/down arrows are mostly useless now-days anyway,
since it requires pin-point accuracy with the mouse,
which in most cases is not essential-
– and it is far more fun to just drag away the middle-thingy anyhow..

If you’re a page designer, HTML5 developer,
consider this minimal set of CSS3 rules to make your end result look far better:
The scrollbar will have constant dimensions, and will allow more efficient scrolling.

Continue reading

OpenSearchDescription Example

Using Wikipedia As A Generic Example.

on the main page specify the OpenSearchDescription resource like so:

<link rel="search" type="application/opensearchdescription+xml" href="/w/opensearch_desc.php" title="Wikipedia (en)"/>

Next you’ll need to serve the actual content:

<?xml version="1.0"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/" xmlns:moz="http://www.mozilla.org/2006/browser/search/">
    <ShortName>Wikipedia (en)</ShortName>
    <Description>Wikipedia (en)</Description>
    <Image height="16" width="16" type="image/x-icon">https://en.wikipedia.org/static/favicon/wikipedia.ico</Image>
    <Url type="text/html" method="get" template="https://en.wikipedia.org/w/index.php?title=Special:Search&amp;search={searchTerms}" />
    <Url type="application/x-suggestions+json" method="get" template="https://en.wikipedia.org/w/api.php?action=opensearch&amp;search={searchTerms}&amp;namespace=0" />
    <Url type="application/x-suggestions+xml" method="get" template="https://en.wikipedia.org/w/api.php?action=opensearch&amp;format=xml&amp;search={searchTerms}&amp;namespace=0" />
    <moz:SearchForm>https://en.wikipedia.org/wiki/Special:Search</moz:SearchForm>
</OpenSearchDescription>

You can serve the textual-content in any way you’ll like to,
writing it dynamically using PHP or serving it from a static-file (better).

But you should serve it using the proper mimetype of application/opensearchdescription+xml
(although it is, in-fact technically a XML content, and would be probably fine to be served as text/xml too).


*People* often use PHP (Wikipedia does..) since it provides a simpler way to control the header for the content-type of the OpenSearchDescription,
which is not really an official-IANA mimetype for a file[1] [2], which means there is not a registered extension which is linked to the OpenSearchDescription mimetype,

So.. by using a simple PHP script:

<?php
  header('Content-Type: application/opensearchdescription+xml;charset=UTF-8');
  (.....echo the XML textual-content....)
?>

You’ll kind-of solve it. Badly.


If you’re running APACHE you far-better place your the XML textual-content in a Unicode/UTF-8 encoded file,
somewhere in your server, for example- at your website-root or at the same level as the index.html file.
Name it something.opensearchdescription, the file name does not actually matter.

In your .htaccess file (which should be placed on the same level, and not deeper in the folder-hirarcty, so it will be effective)-
– add the following lines:

<FilesMatch "\.(?i:opensearchdescription)$">
  <ifModule mod_headers.c>
    Header set Content-Type "application/opensearchdescription+xml;charset=UTF-8"
  </IfModule>
</FilesMatch>

You can use cURL --user-agent "Mozila/Chrome" --url "http://path-to-your-something.opensearchdescription/something.opensearchdescription" --verbose to verify the header does come-back as part of the response-headers.


Files with that extension will be served with this Content-Type header.

Done, Enjoy :]

Preload Google Analytics

Adding a small addition to the head of the page will speed-up the loading of the Google Analytics code you most-probably have on your page.

And it is super easy too!
for the most parts you only need to add a single line:
Continue reading

aria2c Sample – Chromium Command-Line Switch Updater

Getting the most updated command-line switches for Chromium (Google-Chrome base code) is always a work in progress,
since this is a `live code` you can never say “Ok, I’m Done”, there will always be a new one, or old one retired from being actively used in the, well.., actual code.
So if you’re relaying on command-line switches in your scripts, or just want to try out new features before the `bleed into` the actual Google-Chrome main version, you probably want to bookmark this article :]]

Continue reading

AdBlock Rule To Block Ping And Beacon Requests

*$important,beacon

Compatible with every adblocking plugins, that supports the adblock-rule format.

You probably want to uninstall AdBlock and install uBlock Origin. AdBlock had sold out :/

JavaScript Snippet – A Human-Readable Memory-Formatter, Add Commas To A Number By Regular-Expression

function human_readable_bytes_size(bytes, decimals, sap) {
  decimals = "number" === typeof decimals ? decimals : 2;
  sap = "string" === typeof sap ? sap : "";

  var 
    size = ['B', 'kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']
  , factor = Math.floor(  (String(bytes).length - 1) / 3  )
  ;
  
  bytes = bytes / Math.pow(1024, factor);  //calc
  bytes = Math.floor(bytes * Math.pow(10, decimals)) / Math.pow(10, decimals);  //round digits
  
   
  return String(bytes) + sap + size[factor];
}



human_readable_bytes_size(29)
//"29B"
human_readable_bytes_size(29000000000000000)
//"25.75PB"
human_readable_bytes_size(2900000000000)
//"2.63TB"
human_readable_bytes_size(290000000000)
//"270.08GB"
human_readable_bytes_size(290000000000,5)
//"270.08354GB"
human_readable_bytes_size(290000000000,5,"---")
//"270.08354---GB"

also available on GitHub: https://github.com/eladkarako/javascript_human_readable_bytes_size

Would you like the PHP version? – http://icompile.eladkarako.com/php-snippet-a-human-readable-memory-formatter-add-commas-to-a-number-by-regular-expression/


This is a variation with comma-separation (only for the integer part since the fraction part looks weird w/ commas..)

function human_readable_bytes_size(bytes, digits, sap, is_comma_sap) {  "use strict";
  digits       = "number"  === typeof digits        ? digits         :  2;
  sap          = "string"  === typeof sap           ? sap            : "";
  is_comma_sap = "boolean" === typeof is_comma_sap  ? is_comma_sap   : false;

  var  size = ['B', 'kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']
     , factor = Math.floor(  (String(bytes).length - 1) / 3  )
     ;

  bytes = bytes / Math.pow(1024, factor);  //calc
  bytes = Math.floor(bytes * Math.pow(10, digits)) / Math.pow(10, digits);  //round digits
  
  if(true === is_comma_sap){
    bytes = String(bytes).split(".");
    bytes[0] = bytes[0].replace(/(\d)(?=(\d{3})+$)/g, "$1,");
    bytes = bytes.join(".");
  }

  return String(bytes) + sap + size[factor];
}

since it is very rare (actually improbable) to use the comma-feature when measuring to the largest scale available,
– In my project https://github.com/eladkarako/any2base64 I’m using a slightly different variation that actually ‘reduce a scale by one’ meaning, instead of using 1GB it will use 1024MB (or 1000-MiB..
* [1] [2])

It works nicely, and sometimes helps to comprehend byte sizes more clearly… Ahhh.. human perspective! ;] ;]

Mozilla FTP – Download Latest Firefox

Latest (~sort of~ “nightly”) Firefox Developer Edition, Code-Name `Aurora`
https://ftp.mozilla.org/pub/firefox/nightly/latest-mozilla-aurora/

This is the full offline-installer, not the `installer-stub` you get from the official website.


Latest Nightly-Build from trunk Firefox
https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central/

You can download a localised (or “localized”.. if you’re an American..) language-specific version on https://ftp.mozilla.org/pub/firefox/nightly/latest-mozilla-aurora-l10n/.


Latest Beta
https://ftp.mozilla.org/pub/firefox/nightly/latest-mozilla-beta-l10n/

It seems that there is no generic package so you must choose one of the localised-packages,
for example https://ftp.mozilla.org/pub/firefox/nightly/latest-mozilla-beta-l10n/firefox-47.0.en-GB.win64.installer.exe or https://ftp.mozilla.org/pub/firefox/nightly/latest-mozilla-beta-l10n/firefox-47.0.en-GB.win64.zip


You may also download ESR (extended support release) for latest or not-so latest versions of Firefox, which is mostly useful if you don’t want to keep updating the core-browser’s version a lot..
Version 45: https://ftp.mozilla.org/pub/firefox/nightly/latest-mozilla-esr45-l10n/
And version 52: https://ftp.mozilla.org/pub/firefox/nightly/latest-mozilla-esr52-l10n/

Here too, you must choose a localised-download..


Browser https://ftp.mozilla.org/pub/firefox/nightly/ for “by date” downloads or any other variation of Firefox you may download, in-full.

HTML Snippet – 100% Fill Textarea-Page

The base of numerous of custom HTML-components
and functional pages is a “textarea page” which consist of
a (surprise surprise..) <textarea> element
and some sort of functionality integrated by a form-submit, JavaScript,
or a mix of both.

Continue reading

Delete A Lot Of WordPress Tags

No Need To Directly Access The DB Or Execute Any SQL Commands (Although It Would Be A Lot Faster…)

Edit a post, open the developer-panel,
switch to “console” and execute this code to delete 15 tags at once.. ;)

Really just a dirty dirty way :))

var x = document.querySelectorAll('.tagchecklist .ntdelbutton');
x[0].focus();  x[0].click();
x[1].focus();  x[1].click();
x[2].focus();  x[2].click();
x[3].focus();  x[3].click();
x[4].focus();  x[4].click();
x[5].focus();  x[5].click();
x[6].focus();  x[6].click();
x[7].focus();  x[7].click();
x[8].focus();  x[8].click();
x[9].focus();  x[9].click();
x[10].focus(); x[10].click();
x[11].focus(); x[11].click();
x[12].focus(); x[12].click();
x[13].focus(); x[13].click();
x[14].focus(); x[14].click();
x[15].focus(); x[15].click();

Deleting them all is kind-of weird: since querying for elements and “deleting” the current element actively changes the list of elements,
we can use the initial query to count roughly how much element were left, looping and querying the first element and removing it –
– keeping querying and removing a single element while the main loop “just checks if there are any still existing”.
– it will take just few minutes for couple of hundreds of tags, and the window might hang for a bit (don’t kill it.. just keep on waiting :/)
and at the end of the run you’ll have 100% post :]

here is it.. plus an alternative for the click method before.

function emu_click_new(target){
  if("object" !== typeof target) return;
  target.dispatchEvent(
    new MouseEvent("click", { screenX:    0     /*MouseEvent  [https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/MouseEvent] */
                            , screenY:    0
                            , clientX:    0
                            , clientY:    0
                            , ctrlKey:    false
                            , shiftKey:   false
                            , altKey:     false
                            , metaKey:    false
                            , button:     0     /*left button       */
                            , buttons:    0     /*no sticky press   */
                            , view:       self  /*UIEventInit [https://developer.mozilla.org/en-US/docs/Web/API/UIEvent/UIEvent]       */
                            , bubbles:    true  /*EventInit   [https://developer.mozilla.org/en-US/docs/Web/API/Event/Event]           */
                            , cancelable: true
                            , scoped:     false
                            , composed:   false
                            }
                  )
  );
}

document.querySelectorAll('.tagchecklist .ntdelbutton').forEach(function(e){
  setTimeout(function(){
    e = document.querySelector('.tagchecklist .ntdelbutton');
    emu_click_new(e);
  }, 100);
});

.htaccess CORS

Header unset Access-Control-Allow-Methods
Header unset Access-Control-Allow-Origin
Header unset Access-Control-Allow-Headers
Header unset Access-Control-Expose-Headers
Header unset Access-Control-Allow-Credentials
Header unset Timing-Allow-Origin

Header set Access-Control-Allow-Methods      "CONNECT,GET,HEAD,OPTIONS,PING,POST,TRACE"
Header set Access-Control-Allow-Origin       "*"
Header set Access-Control-Allow-Headers      "Accept,Accept-Charset,Accept-Encoding,Accept-Language,Access-Control-Allow-Credentials,Access-Control-Allow-Headers,Access-Control-Allow-Methods,Access-Control-Allow-Origin,Access-Control-Expose-Headers,Access-Control-Max-Age,Access-Control-Request-Headers,Access-Control-Request-Method,Cache-Control,Connection,Content-Description,Content-Encoding,Content-Language,Content-Length,Content-Transfer-Encoding,Content-Type,Cookie,Date,DNT,Expires,Host,If-Modified-Since,Keep-Alive,Last-Modified,Origin,Pragma,Referer,Remote-Address,Server,Set-Cookie,Timing-Allow-Origin,Transfer-Encoding,User-Agent,Vary,X-Content-Type-Options,X-CustomHeader,X-Forwarded-For,X-Forwarded-Host,X-Forwarded-Port,X-Forwarded-Proto,X-Forwarded-Server,X-HTTP-Method-Override,X-Modified,X-OTHER,X-PING,X-PINGOTHER,X-Powered-By,X-Real-IP,X-Requested-With"
Header set Access-Control-Expose-Headers     "Accept,Accept-Charset,Accept-Encoding,Accept-Language,Access-Control-Allow-Credentials,Access-Control-Allow-Headers,Access-Control-Allow-Methods,Access-Control-Allow-Origin,Access-Control-Expose-Headers,Access-Control-Max-Age,Access-Control-Request-Headers,Access-Control-Request-Method,Cache-Control,Connection,Content-Description,Content-Encoding,Content-Language,Content-Length,Content-Transfer-Encoding,Content-Type,Cookie,Date,DNT,Expires,Host,If-Modified-Since,Keep-Alive,Last-Modified,Origin,Pragma,Referer,Remote-Address,Server,Set-Cookie,Timing-Allow-Origin,Transfer-Encoding,User-Agent,Vary,X-Content-Type-Options,X-CustomHeader,X-Forwarded-For,X-Forwarded-Host,X-Forwarded-Port,X-Forwarded-Proto,X-Forwarded-Server,X-HTTP-Method-Override,X-Modified,X-OTHER,X-PING,X-PINGOTHER,X-Powered-By,X-Real-IP,X-Requested-With"
Header set Access-Control-Allow-Credentials  "true"
Header set Timing-Allow-Origin               "*"

eBay Bad Sellers

There are plenty of “Bad-Buyers” websites,
for sellers to be adding to their “ignore list”,
but not much of (if any) “bad seller” lists,


From time to time you hear of a seller that sends partial-delivery,
Or even avoid sending anything at all (especially if you place a very small order),
After two or three months when you’ll send them a message,
They will act *all “surprised”* and if you are lucky you might get your money back,
that is, if they will bothered to answer you at all,
and it wasn’t too long until you’ve opened a case with either eBay/PayPal.

why wouldn’t you just avoid that scenario at all?
apparently my other article JavaScript Ninja – Crowd Wisdom eBay Enhancements was so popular, that I’ve actually got address by few of my blog-readers,
sharing some ‘horror’-stories about recent purchases,
We’ve had a new idea:

A seller blacklist

Continue reading

CSS3 Ninja – Pure CSS-KeyFrame Animation Example

An infinite, alternate animation converting a shape, with initial delay,
no javascript, pure css.

– centring the shape using the top0-left0-right0-bottom0-margin_auto trick.
– sizing the share using viewport

vw: 1/100th viewport width
vh: 1/100th viewport height
vmin: 1/100th of the smallest side
vmax: 1/100th of the largest side

HTML Entity – Infinite Convertion Bookmarklet Toolkit

javascript:(function(window, document, to_HTMLENTITY, s, is_everychar){  "use strict";
  while(true){
    s             = prompt("String To HTML-Entity.\nEnter Input String:", s);
    if(null === s) return;
    is_everychar  = prompt("String To HTML-Entity.\n[true] Convert Every Character.\n[false]Convert Just Unicode.", "false");

    prompt("HTML-Entity Result:", to_HTMLENTITY(s, "true" === is_everychar));
  }
}(
  top
, top.document
, function to_HTMLENTITY(s, is_everychar){
    var regex = true === is_everychar ? /./ug : /[\u0080-\u10FFFF]/ug
    return s.replace(regex, function(c){
      c = c.charCodeAt(0).toString(16).toUpperCase();
      c = ("0000" + c).substr(-4);
      c = "&#x" + c + ";";
      return c;
    });
  }
, ""
));

minified..

javascript:(function(window,document,to_HTMLENTITY,s,is_everychar){while(true){s=prompt("String To HTML-Entity.\nEnter Input String:",s);if(null===s)return;is_everychar=prompt("String To HTML-Entity.\n[true] Convert Every Character.\n[false]Convert Just Unicode.","false");prompt("HTML-Entity Result:",to_HTMLENTITY(s,"true"===is_everychar))}})(top,top.document,function to_HTMLENTITY(s,is_everychar){var regex=true===is_everychar?/./ug:/[\u0080-\u10FFFF]/ug;return s.replace(regex,function(c){c=c.charCodeAt(0).toString(16).toUpperCase();
c=("0000"+c).substr(-4);c="&#x"+c+";";return c})},"");

HTML ENTITY – Every Character VS. Just Unicode

function to_HTMLENTITY(s, is_everychar){ "use strict";
  var regex = true === is_everychar ? /./ug : /[\u0080-\u10FFFF]/ug
  return s.replace(regex, function(c){
    c = c.charCodeAt(0).toString(16).toUpperCase();
    c = ("0000" + c).substr(-4);
    c = "&#x" + c + ";";
    return c;
  });
}

HTML Entity – Unicode Escape

For Unicode only:

'Français'
  .replace(/[\u0080-\u10FFFF]/ug, function(c){
                                    return "&#x" + ("0000" + c.charCodeAt(0).toString(16)).toUpperCase().substr(-4) + ";" 
                                  });

output:

&#x0046;ran&#x00E7;ais

Continue reading

Google Domain2IP (DNS Over HTTPS)

https://dns.google.com/resolve?name=example.com

Will give you:

{"Status": 0,"TC": false,"RD": true,"RA": true,"AD": true,"CD": false,"Question":[ {"name": "example.com.","type": 1}],"Answer":[ {"name": "example.com.","type": 1,"TTL": 36524,"data": "93.184.216.34"}]}

You can see more switches at this version:
https://dns.google.com/query?name=example&type=A&dnssec=true

Read more:
https://developers.google.com/speed/public-dns/docs/dns-over-https

The Most Popular Adblock Lists

Adblock Warning Removal List                   https://easylist-downloads.adblockplus.org/antiadblockfilters.txt
Anti-Adblock Killer by Reek                    https://raw.githubusercontent.com/reek/anti-adblock-killer/master/anti-adblock-killer-filters.txt
Blockzilla by zpacman                          https://raw.githubusercontent.com/zpacman/Blockzilla/master/Blockzilla.txt
EasyList                                       https://easylist.to/easylist/easylist.txt
EasyList Arabian                               https://easylist-downloads.adblockplus.org/Liste_AR.txt
EasyList Bulgarian                             http://stanev.org/abp/adblock_bg.txt
EasyList Chinese                               https://easylist-downloads.adblockplus.org/easylistchina.txt
EasyList Chinese CJX's Annoyance List          https://raw.githubusercontent.com/cjx82630/cjxlist/master/cjx-annoyance.txt
Easylist Czech/Slovak                          https://raw.githubusercontent.com/tomasko126/easylistczechandslovak/master/filters.txt
EasyList Dutch                                 https://easylist-downloads.adblockplus.org/easylistdutch.txt
EasyList French                                https://easylist-downloads.adblockplus.org/liste_fr.txt
EasyList Germany                               https://easylist.to/easylistgermany/easylistgermany.txt
EasyList Hebrew                                https://raw.githubusercontent.com/easylist/EasyListHebrew/master/EasyListHebrew.txt
EasyList Icelandic                             https://adblock.gardar.net/is.abp.txt
EasyList Indonesian                            https://raw.githubusercontent.com/heradhis/indonesianadblockrules/master/subscriptions/abpindo.txt
EasyList Italian                               https://easylist-downloads.adblockplus.org/easylistitaly.txt
EasyList Japanese                              https://raw.githubusercontent.com/k2jp/abp-japanese-filters/master/abp_jp.txt
Easylist Latvian                               https://notabug.org/latvian-list/adblock-latvian/raw/master/lists/latvian-list.txt
EasyList Lithuanian                            http://margevicius.lt/easylistlithuania.txt
EasyList Romanian                              https://www.zoso.ro/pages/rolist.txt
EasyList Russian                               https://easylist-downloads.adblockplus.org/advblock.txt
EasyList Spanish                               https://easylist-downloads.adblockplus.org/easylistspanish.txt
EasyList without element hiding rules          https://easylist-downloads.adblockplus.org/easylist_noelemhide.txt
EasyPrivacy                                    https://easylist.to/easylist/easyprivacy.txt
EasyPrivacy without international filters      https://easylist-downloads.adblockplus.org/easyprivacy_nointernational.txt
Fanboy's Annoyance List                        https://easylist.to/easylist/fanboy-annoyance.txt
Fanboy's Social Blocking List                  https://easylist.to/easylist/fanboy-social.txt
I don't care about cookies                     https://www.kiboke-studio.hr/i-dont-care-about-cookies/abp/
Prebake - Filter Obtrusive Cookie Notices      https://raw.githubusercontent.com/liamja/Prebake/master/obtrusive.txt