git format-patch -1 <sha>
OR
git format-patch -1 HEAD
git apply --stat file.patch
# show stats.
git apply --check file.patch
# check for error before applying
import json | |
SEPARATOR = '/' | |
def encode_value(value): | |
return json.dumps(value, indent=2, sort_keys=True) | |
def decode_value(item_value): | |
if hasattr(item_value, 'decode'): | |
item_value = item_value.decode() |
1) Способ доставки в приложение любых переменных в яваскрипт | |
https://www.simonewebdesign.it/how-to-get-environment-variables-in-the-browser/ | |
2) А это как применить красиво | |
https://engineering.contaazul.com/handling-environment-variables-in-the-browser-bbde35661798 | |
Идея: | |
1) генерим любым способом json-файл vars.js вида: | |
window.my_vars = { | |
v1: ..., | |
v2: ... |
A warning occurred (42 apples) | |
An error occurred |
//create bookmark with name dev_mode: | |
//add to url code: | |
//javascript:n='var_anyname_dev_mod'; v=document.cookie.match('(^|; )'+n+'=([^;]+)'); document.cookie=n+'='+(v?';path=/;expires='+(new Date(0)).toGMTString()+';':'1;path=/;');window.location.reload(); | |
n='var_anyname_dev_mod'; | |
v=document.cookie.match('(^|; )'+n+'=([^;]+)'); | |
document.cookie=n+'='+(v?';path=/;expires='+(new Date(0)).toGMTString()+';':'1;path=/;'); | |
window.location.reload(); |
Create new filters and create new labels.
from:([email protected]) AND {"Patch Links" "approved this pull request." "requested changes on this pull request." "commented on this pull request." "pushed 1 commit." "pushed 2 commits." "pushed 3 commits."}
label: gh-pull-request
# Recursive dictionary merge | |
# Copyright (C) 2016 Paul Durivage <[email protected]> | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, | |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
import collections | |
import os | |
import re | |
from copy import deepcopy | |
from functools import reduce | |
from operator import getitem | |
def update_nested_dicts(base_dct, new_dct, only_existed_keys=False): | |
# IN[]: |
The deadsnakes PPA make the latest stable versions of python available on LTS distributions. I now find it preferable to installing from source, whether from download or using pyenv.
The following was tested on a stock Ubuntu 18.04.3 LTS desktop with python 2.7.15 and 3.68 as the shipping system python versions. The pip3 binary was install using the stock python3-pip package, updated with pip3 install --upgrade pip
.
One of the key reasons this works for me is that I've been aggressive about individually virtualizing project environments with venv.
First, add the deadsnakes PPA to apt:
class Table(Base): | |
id = Column(Integer, primary_key=True) | |
_name = Column('name', String(24)) | |
@property | |
def name(self): | |
return self._name; | |
@name.setter | |
def name(self, value): |