How to Ignore Merge Conflicts for Specific Files in a Git Repository
Create a directory and git init
it
$ mkdir merge-test
$ cd merge-test/
$ git init
class SomeView(View): | |
def dispatch(self, request, *args, **kwargs): | |
# imports and start profiling | |
import cProfile, pstats, StringIO | |
pr = cProfile.Profile() | |
pr.enable() | |
# all logic runs here |
/* bling.js */ | |
window.$ = document.querySelector.bind(document); | |
window.$$ = document.querySelectorAll.bind(document); | |
Node.prototype.on = window.on = function(name, fn) { this.addEventListener(name, fn); }; | |
NodeList.prototype.__proto__ = Array.prototype; | |
NodeList.prototype.on = function(name, fn) { this.forEach((elem) => elem.on(name, fn)); }; |
How to Ignore Merge Conflicts for Specific Files in a Git Repository
Create a directory and git init
it
$ mkdir merge-test
$ cd merge-test/
$ git init
/* | |
* Динамическая сетка | |
* Внедряется подмешиванием DOM-узлу поведенческих классов: grid_col_3, grid_cell... | |
*/ | |
.grid | |
box-sizing border-box | |
/* | |
* Генерирует стили для сетки |
SELECT details.installer.name, COUNT(*) | |
FROM | |
TABLE_DATE_RANGE( | |
[the-psf:pypi.downloads], | |
TIMESTAMP("20160601"), | |
TIMESTAMP("20160630") | |
) | |
WHERE file.project='django-material' | |
group by details.installer.name |
# the mixin | |
class JSONFieldFormMixin(object): | |
""" | |
Given that a model has some kind of TextField ``json_storage_field`` with | |
a string of JSON formatted data inside, this mixin adds handling of this | |
field to a ModelForm. | |
It will read the text field, convert to Python dict, fill the form fields | |
that are given via ``json_fields`` and on saving will write this back to |
Ansible playbook to setup HTTPS using Let's encrypt on nginx. | |
The Ansible playbook installs everything needed to serve static files from a nginx server over HTTPS. | |
The server pass A rating on [SSL Labs](https://www.ssllabs.com/). | |
To use: | |
1. Install [Ansible](https://www.ansible.com/) | |
2. Setup an Ubuntu 16.04 server accessible over ssh | |
3. Create `/etc/ansible/hosts` according to template below and change example.com to your domain | |
4. Copy the rest of the files to an empty directory (`playbook.yml` in the root of that folder and the rest in the `templates` subfolder) |
The assumed default setting in /etc/systemd/journald.conf
is Storage=auto
which implies that systemd journaling will only persist the journal if the expected storage location is available. Otherwise, the journal data is stored in memory and lost between reboots. On Ubuntu 16.04, /var/log/journal
does not exist by default. Create it to keep and query events from previous boots.
Considerations:
[Unit] | |
Description=Sidekiq workers | |
# start as many workers as you want here | |
Wants[email protected] | |
Wants[email protected] | |
# ... | |
[Service] | |
Type=oneshot | |
ExecStart=/bin/true |
const hoverTime = 400 | |
const fetchers = {} | |
const doc = document.implementation.createHTMLDocument('prefetch') | |
function fetchPage (url, success) { | |
const xhr = new XMLHttpRequest() | |
xhr.open('GET', url) | |
xhr.setRequestHeader('VND.PREFETCH', 'true') | |
xhr.setRequestHeader('Accept', 'text/html') | |
xhr.onreadystatechange = () => { |