Skip to content

Instantly share code, notes, and snippets.

(defui Artist
static IQuery
(query [cl _]
[:db/id :artist/name])
Object
(render [{:keys [props]}]
(dom/div nil (:artist/name props))))
(defui ArtistList
static IQuery
@paulirish
paulirish / bling.js
Last active May 1, 2024 19:56
bling dot js
/* bling.js */
window.$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function (name, fn) {
this.addEventListener(name, fn);
}
NodeList.prototype.__proto__ = Array.prototype;
@adewes
adewes / README.md
Last active February 13, 2024 16:39
Ebay Ads - Bot. Because who wants to write messages by hand...

To use this bot:

  • Download ads_bot.py and requirements.txt.
  • Type pip install -r requirements.txt to install the requirements.
  • Fill out the required information in the Python file.
  • Ideally, create a (free) Slack account and set up a web hook to receive notifications from the bot.
  • Run the script :)
  • Relax and be ready to answer incoming calls :D
@elijahmanor
elijahmanor / React-Donut-Chart-SVG-Component.markdown
Created February 20, 2015 06:30
React Donut Chart SVG Component
@sebmarkbage
sebmarkbage / Enhance.js
Last active January 31, 2024 18:33
Higher-order Components
import { Component } from "React";
export var Enhance = ComposedComponent => class extends Component {
constructor() {
this.state = { data: null };
}
componentDidMount() {
this.setState({ data: 'Hello' });
}
render() {

2015-01-29 Unofficial Relay FAQ

Compilation of questions and answers about Relay from React.js Conf.

Disclaimer: I work on Relay at Facebook. Relay is a complex system on which we're iterating aggressively. I'll do my best here to provide accurate, useful answers, but the details are subject to change. I may also be wrong. Feedback and additional questions are welcome.

What is Relay?

Relay is a new framework from Facebook that provides data-fetching functionality for React applications. It was announced at React.js Conf (January 2015).

@bobbygrace
bobbygrace / trello-css-guide.md
Last active May 15, 2024 16:01
Trello CSS Guide

Hello, visitors! If you want an updated version of this styleguide in repo form with tons of real-life examples… check out Trellisheets! https://github.com/trello/trellisheets


Trello CSS Guide

“I perfectly understand our CSS. I never have any issues with cascading rules. I never have to use !important or inline styles. Even though somebody else wrote this bit of CSS, I know exactly how it works and how to extend it. Fixes are easy! I have a hard time breaking our CSS. I know exactly where to put new CSS. We use all of our CSS and it’s pretty small overall. When I delete a template, I know the exact corresponding CSS file and I can delete it all at once. Nothing gets left behind.”

You often hear updog saying stuff like this. Who’s updog? Not much, who is up with you?

@defndaines
defndaines / fizz-buzz.clj
Last active August 29, 2015 14:09
Unconditional Fizz Buzz
; Inspired by https://twitter.com/gigasquid/status/530699466891067392 ...
; An implementation of the Fizz Buzz Kata with no conditionals.
(defn fb-gen
[step value]
(into (sorted-map) (zipmap (range step 101 step) (repeat value))))
(def nums (into (sorted-map) (zipmap (range 1 101) (range 1 101))))
(def threes (fb-gen 3 "fizz"))
(def fives (fb-gen 5 "buzz"))
(def fifteens (fb-gen 15 "fizzbuzz"))
@acdha
acdha / vertical-centering.css
Last active September 5, 2019 22:09
How to vertically center arbitrary contents using flexbox with backwards compatibility for IE10, Safari 5.1, Android < 4.4, etc.
.vertical-center {
display: -moz-box;
-moz-box-align: center;
display: -webkit-box;
-webkit-box-align: center;
display: -ms-flexbox;
-ms-flex-align: center;
display: -webkit-flex;
-webkit-align-items: center;
display: flex;
@staltz
staltz / introrx.md
Last active May 24, 2024 07:56
The introduction to Reactive Programming you've been missing