Skip to content

Instantly share code, notes, and snippets.

View zaygraveyard's full-sized avatar

Ziad El Khoury Hanna zaygraveyard

View GitHub Profile
@zaygraveyard
zaygraveyard / syntool_json_shapes_format.md
Last active April 13, 2021 15:58
Syntool JSON Shapes format
@zaygraveyard
zaygraveyard / README.md
Last active March 5, 2020 18:13
Bookmarklet to filter Histoire d'Or's rings by size

HOF

`javascript:(function(t%2Ce%2Cl%2Cn%2Ci%2Ca%2Co%2Cr%2Cd)%7Bif((o%3Dt.z%3Dt.z%7C%7C%7B%7D).t)return%20o.t()%3Bd%3De%2B%22All%22%2Cr%3Dl%2B%22%3Anot(%5Bdata-zc%5D)%22%2Co.F%3Dt%3D%3E%7BzF.disabled%3D!0%2Ci(a%5Bd%5D(r)%2Ct%3D%3Et%5Be%5D(n)%7C%7C(t.style.display%3D%22none%22))%2CPromise.all(i(a%5Bd%5D(r%2B%60%20%24%7Bn%7D%20a%60)%2Casync(t%2Ce%2Cn%2Co)%3D%3E%7B(e%3Da.createElement(%22html%22)).innerHTML%3Dawait(await%20fetch(t.href)).text()%2C0!%3D%3D(n%3Di(e%5Bd%5D('.select-style%20%5Bdata-code%3D%22size%22%5D%20option%2C%20.declination-selector%20option')%2C(t%2Ce)%3D%3E(e%3Dt.innerText.match(%2F%5Cd%2B%2Fg))%3FparseFloat(e%5B0%5D)%3Anull).filter(Boolean)).length%26%26((o%3Dt.closest(l)).setAttribute(%22data-zc%22%2C%22%22)%2CMath.min(...n)%3E46%26%26(o.style.display%3D%22none%22))%7D)).then(t%3D%3EzF.disabled%3D!1)%7D%2Co.M%3Dt%3D%3E%7B(t%3Da%5Be%5D(%22.infinite-view%22))%3Ft.click()%3A!a%5Be%5D(%22.loading%22)%26%26o.r%26%26o.A()%7D%2Co.A%3Dt%3D%3E%7BclearInterval(o.r)%2Co.r%3Do.r%3F0%3AsetInterval(

@zaygraveyard
zaygraveyard / es-module-shims-loader.js
Last active December 17, 2021 22:33
ES Module shims loader for intern (https://github.com/theintern/intern)
(function() {
'use strict';
intern.registerLoader(function(options) {
if (intern.environment !== 'browser') {
throw new Error('The ES Module Shims loader only works in the browser');
}
if (typeof options.esModulesShims !== 'string') {
throw new Error(
'The ES Module Shims loader requires "esModulesShims" to be of type ' +
This file has been truncated, but you can view the full file.
$ LD_DEBUG=all maim
1807:
1807: file=libX11.so.6 [0]; needed by maim [0]
1807: find library=libX11.so.6 [0]; searching
1807: search cache=/etc/ld.so.cache
1807:
1807: file=libX11.so.6 [0]; needed by maim [0]
1807: find library=libX11.so.6 [0]; searching
1807: search cache=/etc/ld.so.cache
1807: trying file=/usr/lib/libX11.so.6
@zaygraveyard
zaygraveyard / viewport-units-ios.less
Last active April 9, 2019 18:44
LESS mixin to support vh and vw units on all iOS Safari versions. Based on an idea by Patrick Burtchaell's: https://gist.github.com/pburtchaell/e702f441ba9b3f76f587 and the SCSS version by Benjamin Morel's: https://gist.github.com/BenMorel/e9e34c08360ebbbd0634
/**
* Fix for vw, vh, vmin, vmax on iOS 7.
* http://caniuse.com/#feat=viewport-units
*
* This fix works by replacing viewport units with px values on known screen sizes.
*
* iPhone 6 and 6 Plus cannot run iOS 7, so are not targeted by this fix.
* Target devices running iOS 8+ will incidentally execute the media query,
* but this will still produce the expected result; so this is not a problem.
*
{
// The name of this extension MUST BE *UNIQUE*.
// @type {String}
"name": "name_of_extension",
// The discription of this extension.
// @type {String}
"description": "An example extension",
// The version of this extension.