Bold+italics means the lib is probably worth checking out above the rest. joffrey
is my own.
import React from "react"; | |
import useMutableReducer from "./useMutableReducer"; | |
const reducer = (draft, action, state) => { | |
switch (action) { | |
case "increment": | |
draft.count++; | |
break; | |
case "decrement": | |
draft.count--; |
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
# https://toster.ru/q/72866 | |
# How to | |
# wget http://gist.github.com/... | |
# chmod +x ya.py | |
# ./ya.py download_url path/to/directory | |
import os, sys, json |
Disclaimer: Please follow this guide being aware of the fact that I'm not an expert regarding the things outlined below, however I made my best attempt. A few people in IRC confirmed it worked for them and the results looked acceptable.
Attention: After following all the steps run gdk-pixbuf-query-loaders --update-cache
as root, this prevents various gdk-related bugs that have been reported in the last few hours. Symptoms are varied, and for Cinnamon the DE fails to start entirely while for XFCE the icon theme seemingly can't be changed anymore etc.
Check the gist's comments for any further tips and instructions, especially if you are running into problems!
Results after following the guide as of 11.01.2017 13:08:
Sometimes you just need to quickly take some notes.
A trick is to use the data:
scheme with data:text/html
to show just a piece of HTML in your browser.
Then using the mighty contentEditable
to make the whole thing editable.
To copy/paste into your browser address bar:
data:text/html,<html contenteditable>
Often you are handed-out big CSV files and need to sort, filter, update some cells or other tedious work.
You tried sed
, jq
, and maybe the mighty awk
.
But at the end of the day: You’re using the wrong tool for the job.
Here come csvkit’s csvsql, a small Python script to parse your CSV files and create the corresponding database. You now have the best tool, SQL, to answer your data questions:
""" | |
Automatic migration of subscriptions to another | |
YouTube account with Python and Selenium. | |
Tested with: | |
- selenium 3.0 | |
- firefox 49.0 | |
- python 3.5 | |
1. Install selenium from pypi: |
''' | |
I started one server: | |
$ python aiohttp_rq.py server | |
And three workers in different terminals: | |
$ python aiohttp_rq.py worker | |
And I got next results with ab: |