Canonical Url: как добавить новую версию сайта и не убить в поисковой выдаче оригинальный сайт. SEO.
Достаточно вставить в head:
1 |
<link rel="canonical" href="https://moz.com/blog" /> |
И теперь можно клепать полные дубли сайтов! SEO approved! ;) https://moz.com/blog/canonical-url-tag-the-most-important-advancement-in-seo-practices-since-sitemaps
Как проверить стиль элемента в javascript
Есть простой способ, но не очень корректный:
1 2 3 4 |
var el = document.createElement('div'); el.style[styleName] = "10px"; document.body.appendChild(el); console.log(el.style[styleName]); |
Есть более сложный способ, но корректный для ошибочных стилей:
1 2 3 4 |
var el = document.createElement('div'); el.style[styleName] = "10px"; document.body.appendChild(el); console.log(window.getComputedStyle(el)[styleName]); |
Пример: JS Bin on jsbin.com
Как почистить DNS cache в Chrome
1 |
chrome://net-internals/#dns -> clear host cache |
http://superuser.com/questions/203674/how-to-clear-flush-the-dns-cache-in-google-chrome
JIRA: интересные jql-запросы
Незаблокированные таски
1 |
issueFunction not in linkedIssuesOf("status IN (\"In Progress\", \"Open\", \"Paused\", \"Reopened\")", blocks) AND resolution = Unresolved |
Задачи, сделанные на прошлой неделе
1 |
Status changed from "In Progress" by membersOf(femob) during (startofweek(), endofweek()) |
Задачи, включённые в следующие релизы
1 |
fixVersion in unreleasedVersions() AND assignee was in membersOf(femob) ORDER BY createdDate DESC |
Задачи без коммитов
1 |
assignee was currentUser() AND issue.property[development].commits > 0 |
Ссылки: http://www.mumosystems.com/jql-the-most-flexible-way-to-search-jira-14/ http://www.mumosystems.com/jql-the-most-flexible-way-to-search-jira-24/ http://www.mumosystems.com/jql-the-most-flexible-way-to-search-jira-34/ http://www.mumosystems.com/jql-the-most-flexible-way-to-search-jira-44/ http://stackoverflow.com/questions/3918255/jira-searching-issues-by-issue-links https://confluence.atlassian.com/jira/advanced-searching-179442050.html http://stackoverflow.com/questions/12257496/jql-filter-other-query https://scriptrunner.adaptavist.com/latest/jira/custom-jql-functions.html
Git: несколько разных ключей для одного хоста на примере bitbucket.org
Всё очень просто, достаточно прописать в ssh-конфиге алиасы:
1 2 3 4 5 6 |
Host work-bitbucket.org HostName bitbucket.org IdentityFile ~/.ssh/workid Host personal-bitbucket.org HostName bitbucket.org IdentityFile ~/.ssh/personalid |
И затем поправить путь к репозиторию гита:
1 |
git remote set-url origin git@work-bitbucket.org:repo_name.git |
https://confluence.atlassian.com/bitbucket/configure-multiple-ssh-identities-for-gitbash-mac-osx-linux-271943168.html
Отдебажить и проинспектировать различную аналитику
https://chrome.google.com/webstore/detail/observepoint-tag-debugger/daejfbkjipkgidckemjjafiomfeabemo?hl=en-US
Добавить/удалить пользователя в Ubuntu
добавить
1 2 |
sudo useradd -d /home/testuser -m testuser sudo passwd testuser |
удалить
1 |
userdel -r testuser |
Загрузка css, которая не блокирует загрузку страницы
Забавный хак-костыль, вдруг когда-нибудь пригодится. Конечно, лучше сначала загрузить critical path css, а все остальные стили убрать в конец страницы (при этом загрузка css не будет мешать загрузке кода страницы), но вдруг пригодится:
1 2 |
<link rel="stylesheet" href="css.css" media="none" onload="if(media!='all')media='all'"> <noscript><link rel="stylesheet" href="css.css"></noscript> |
http://keithclark.co.uk/articles/loading-css-without-blocking-render/
Как у меня настроен gmail
По большей части так: http://geektimes.ru/post/140794/
Настройка гита для пулла из одного репозитория и пуша в другой
Можно настроить два разных remote, как описано здесь — https://blog.bullgare.com/2014/11/gitlab-flow/. Но если нужно исключительно делать fetch из одного репозитория, а push — только во второй, то лучше сделать так:
1 2 3 4 |
# fetch repo git remote set-url origin git@bitbucket.org:repo1.git # push repo git remote set-url origin --push git@bitbucket.org:repo1.git |
Посмотреть текущие параметры репозиториев можно так:
1 |
git remote -v |
Обсуждение — http://stackoverflow.com/a/3195446/801426