A "Best of the Best Practices" (BOBP) guide to developing in Python.
- "Build tools for others that you want to be built for you." - Kenneth Reitz
- "Simplicity is alway better than functionality." - Pieter Hintjens
# sudo apt-get install dnsmasq | |
# echo "address=/.dev/127.0.0.1" | sudo tee /etc/dnsmasq.conf | |
# sudo update-rc.d dnsmasq enable | |
# sudo service dnsmasq restart |
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.
Relay is a new framework from Facebook that provides data-fetching functionality for React applications. It was announced at React.js Conf (January 2015).
(require '[figwheel-sidecar.repl-api :as repl]) | |
(def config | |
{:figwheel-options {} | |
:build-ids ["browser"] | |
:all-builds [{:id "browser" | |
:source-paths ["src/" "env/browser/"] | |
:figwheel {:on-jsload "id.client/main"} | |
:compiler {:output-to "public/js/app.js" | |
:output-dir "public/js" |
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft
, elem.offsetTop
, elem.offsetWidth
, elem.offsetHeight
, elem.offsetParent
import argparse | |
import hashlib | |
import os | |
from collections import defaultdict | |
import sys | |
from bs4 import BeautifulSoup as bs | |
import re | |
import requests |
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
# Copyright © 2016 Yannick Loiseau <[email protected]> | |
# This work is free. You can redistribute it and/or modify it under the | |
# terms of the Do What The Fuck You Want To Public License, Version 2, | |
# as published by Sam Hocevar. See http://www.wtfpl.net/ for more details. | |
""" | |
on-modify hook for taskwarrior. | |
This hook connects taskwarrior and watson. |