Skip to content

Instantly share code, notes, and snippets.

View cloud-walker's full-sized avatar
🎯
Focusing

Luca Barone cloud-walker

🎯
Focusing
View GitHub Profile
// https://webreflection.medium.com/using-the-input-datetime-local-9503e7efdce
Date.prototype.toDatetimeLocal =
function toDatetimeLocal() {
var
date = this,
ten = function (i) {
return (i < 10 ? '0' : '') + i;
},
YYYY = date.getFullYear(),
MM = ten(date.getMonth() + 1),
@gaearon
gaearon / reducers.js
Last active December 11, 2020 14:56
How I'd do code splitting in Redux (pseudo code, not tested!)
import { combineReducers } from 'redux';
import users from './reducers/users';
import posts from './reducers/posts';
export default function createReducer(asyncReducers) {
return combineReducers({
users,
posts,
...asyncReducers
});
@Dv92
Dv92 / styles.less
Last active November 12, 2018 10:36
Atom: how to show invisibile characters on selected text like sublime text does
atom-text-editor::shadow {
.editor-contents--private {
.invisible-character {
visibility: hidden;
}
&.has-selection {
.invisible-character {
visibility: visible;