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 Thirouin MoOx

:shipit:
Freelance React / React Native Expert, Cross-platform fanboy (native, web...)
View GitHub Profile
%reset-Button {
border: none;
margin: 0;
padding: 0;
width: auto;
overflow: visible;
background: transparent;
/* inherit font & color from ancestor */
@MoOx
MoOx / index.js
Last active February 9, 2024 22:44
Export/import github labels
// go on you labels pages
// eg https://github.com/cssnext/cssnext/labels
// paste this script in your console
// copy the output and now you can import it using https://github.com/popomore/github-labels !
var labels = [];
[].slice.call(document.querySelectorAll(".label-link"))
.forEach(function(element) {
labels.push({
name: element.textContent.trim(),
@MoOx
MoOx / storage.js
Created May 22, 2014 11:56
Simple localStorage abstraction
var prefix = "storage."
, storage = {
getAll: function() {
var data = {};
for (var key in localStorage){
if (key.indexOf(prefix) === 0) {
data[key.replace(prefix, "")] = storage.getFromLocalStorage(key);
}
}
@MoOx
MoOx / README.md
Last active May 11, 2023 13:59
How to keep in sync your Git repos on GitHub, GitLab & Bitbucket easily
@MoOx
MoOx / README.md
Last active May 5, 2023 12:35
rework vs postcss benchmarks

Rework vs Postcss

❯ node rework.js
rework: parsing/stringify done in 243.85ms (avg on 50 runs)

❯ node postcss.js
postcss: parsing/stringify done in 408.26ms (avg on 50 runs)
@MoOx
MoOx / isDblTouchTap.js
Last active April 30, 2023 19:28
Double touch tap workaround for React based on onTouchTap (react-tap-event-plugin)
const dblTouchTapMaxDelay = 300
let latestTouchTap = {
time: 0,
target: null,
}
export default function isDblTouchTap(event) {
const touchTap = {
time: new Date().getTime(),
target: event.currentTarget,
@MoOx
MoOx / README.md
Last active April 28, 2023 08:10
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 / install-flow-windows.md
Last active November 22, 2022 08:59
Unofficial Flow Windows binary
@MoOx
MoOx / comments-trick.json
Last active October 17, 2022 15:00
How to make comment in JSON file
{
"//field": "These 'double quote' 'double quote' are used as comments, because JSON doesnt' allow comment",
"field": {},
"#another-field": "Another comment",
"another-field": {},
"/*stuff": "Be careful to use them when you have full control of the content :)",
"stuff": [],
"bla": "bla"
}
@MoOx
MoOx / package.json.js
Last active June 26, 2022 22:18
Boost your Webpack performance with DLLPlugin (will bundle as dll all your "dependencies", see comment in package.json)
{
"private": true,
// ...
"#dependencies": "dependencies are the one shipped to the client",
"dependencies": {
"babel-polyfill": "^6.7.4",
"react": "^15.0.0",
// ...
"whatwg-fetch": "^0.11.1"
},