Skip to content

Instantly share code, notes, and snippets.

:root {
--font-size: 15.5px;
--font-color: hsl(205, 23%, 16%);
--font-color-lighter: hsl(0, 0%, 40%);
--font-color-placeholder: hsl(0, 0%, 70%);
--link-color: hsl(203, 82%, 35%);
--selection-color: hsl(203, 100%, 74%);
--border-color: rgba(0, 0, 0, 0.08);
--subtle-border-color: rgba(0, 0, 0, 0.05);
--main-background-color: hsl(210, 9%, 98%);
@wirtzdan
wirtzdan / magic-list-queries.md
Last active March 5, 2022 17:25
Magic List Queries
  • Recently assigned
    • {{[[query]]: {and: [[TODO]] {not: {or: [[Today]] [[Upcoming]] [[Later]] [[Template]] [[query]]]}}}}}
  • Today
    • {{[[query]]: {and: [[TODO]] [[Today]] {not: {or: [[Template]] [[query]]]}}}}}
  • Upcoming
    • {{[[query]]: {and: [[TODO]] [[Upcoming]] {not: {or: [[Template]] [[query]]]}}}}}
  • Later
    • {{[[query]]: {and: [[TODO]] [[Later]] {not: {or: [[Template]] [[query]]]}}}}}
@ldez
ldez / gmail-github-filters.md
Last active July 2, 2024 12:25
Gmail and GitHub - Filters

Gmail and GitHub

How to filter emails from GitHub in Gmail and flag them with labels.

The labels in this document are just examples.

Pull Request

Filter Label
@bdchauvette
bdchauvette / .babelrc
Last active June 21, 2021 17:44
Minimal babel boilerplate
{
"presets": [ "es2015" ]
}
@gaearon
gaearon / slim-redux.js
Last active May 5, 2024 15:14
Redux without the sanity checks in a single file. Don't use this, use normal Redux. :-)
function mapValues(obj, fn) {
return Object.keys(obj).reduce((result, key) => {
result[key] = fn(obj[key], key);
return result;
}, {});
}
function pick(obj, fn) {
return Object.keys(obj).reduce((result, key) => {
if (fn(obj[key])) {
@HenrikJoreteg
HenrikJoreteg / README.md
Last active September 20, 2021 01:36
Minimalist routing in Redux

Why would you want to do this? Because you often don't need more. It's nice to not have to think about your "router" as this big special thing.

Instead, with this approch, your app's current pathname is just another piece of state, just like anything else.

This also means that when doing server-side rendering of a redux app, you can just do:

var app = require('your/redux/app')
var React = require('react')
@gaearon
gaearon / combining.js
Created June 3, 2015 18:03
Combining Stateless Stores
// ------------
// counterStore.js
// ------------
import {
INCREMENT_COUNTER,
DECREMENT_COUNTER
} from '../constants/ActionTypes';
const initialState = { counter: 0 };
@jhorneman
jhorneman / problems with Flux.md
Last active August 22, 2016 02:18
How to combine the Flux pattern with large hierarchical data

How to combine the Flux pattern with large hierarchical data

I've been converting the web client part of an application I'm developing for a client from plain old JavaScript to React and Flux. (Because this is closed-source client work, I will be a bit vague about what the application is and does.)

Something about my data, my use case, and how I've implemented things, or some combination of those three, doesn't fit the Flux pattern well. So I am writing this to explain my problem and hopefully get some interesting feedback on it. (If you're reading this: thanks.)

The application

I have a Python server which talks to a PostgreSQL database and provides data in JSON format over a REST-ish API (not pure REST, more RPC-style).

React-Core Meeting Notes 2015-03-20

Note: This is the first time we're sharing meeting notes publicly. The primary reason we haven't shared these is because we often mix public discussions with matters that are Facebook specific and should not be public. We're really trying to be more open about our development process and what's happening inside the project so moving forward, we'll be sharing meeting notes. While most of us do work at Facebook, we're committed to this being an open project - for now we'll filter out the private notes from the public notes. Hopefully we can make it possible for these meetings to be open to any who wish to attend.

Attendees:

  • @zpao
  • @sebmarkbage
  • @spicyj
  • @jeffmo
@koistya
koistya / DefaultLayout.jsx
Last active July 1, 2021 16:05
React.js (ReactJS) Page and Layout components. For a complete sample visit https://github.com/kriasoft/react-starter-kit and http://reactjs.kriasoft.com (demo)
/**
* Page layout, reused across multiple Page components
* @jsx React.DOM
*/
var React = require('react');
var ExecutionEnvironment = require('react/lib/ExecutionEnvironment');
var Navigation = require('../components/Navigation.jsx');
var DefaultLayout = React.createClass({