This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Default text editor | |
export EDITOR=subl | |
# get current branch in git repo | |
function parse_git_branch() { | |
BRANCH=`git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'` | |
if [ ! "${BRANCH}" == "" ] | |
then | |
STAT=`parse_git_dirty` | |
echo "[${BRANCH}${STAT}]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Сгенерировать ключ с помощью PuttyGen | |
1.1. Сохранить private key в файл. | |
1.2. Скопировать публичный ключ в буфер обмена | |
2. Добавить скопированные публичный ключ в BitBucket (Manage Account -> SSH key) | |
3. Запустить PAgent и добавить приватный ключ. | |
4. Выполнить команду: plink git@bitbucket.org | |
4.1. На вопрос: Store key in cache? (y/n) ответить y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
branch=$(git rev-parse --abbrev-ref HEAD) | |
if [ "gh-pages" == "$branch" ]; then | |
exit | |
fi | |
echo Updating gh-pages for branch $branch | |
git checkout gh-pages | |
git checkout $branch -- dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://octodex.github.com/images/hanukkat.png | |
https://octodex.github.com/images/welcometocat.png | |
https://octodex.github.com/images/filmtocat.png | |
https://octodex.github.com/images/privateinvestocat.jpg | |
https://octodex.github.com/images/gracehoppertocat.jpg | |
https://octodex.github.com/images/gobbleotron.gif | |
https://octodex.github.com/images/jetpacktocat.png | |
https://octodex.github.com/images/minertocat.png | |
https://octodex.github.com/images/mountietocat.png | |
https://octodex.github.com/images/saketocat.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 1. Переходим на свою страницу в ВК | |
// 2. Зажимаем пробел и ждем, пока лента прокрутится до нужных постов или до конца | |
// 3. В консоль браузера вставляем нежеследующий код и давим Enter | |
// 4. Подтверждаем удаление постов | |
(function() { | |
'use strict'; | |
if (!confirm('Удалить все записи со стены?')){ | |
return; | |
} | |
var deletePostLink = document.body.querySelectorAll('a.ui_actions_menu_item[onclick^="wall.deletePost"]'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
ROOT_PASSWORD=$(zenity --password --title "Enter root password") | |
if [ "${ROOT_PASSWORD}" ]; then | |
echo $ROOT_PASSWORD | sudo -S echo "TEST" > ./test.txt | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://developer.chrome.com/extensions/webRequest — документация по входящим/исходящим хедерам | |
Пример удаления csp: | |
chrome.webRequest.onHeadersReceived.addListener(function(details) { | |
for (var i = 0; i < details.responseHeaders.length; i++) { | |
if ('content-security-policy' === details.responseHeaders[i].name.toLowerCase()) { | |
details.responseHeaders[i].value = ''; | |
} | |
} | |
return { | |
responseHeaders: details.responseHeaders |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://habrahabr.ru/post/248189/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Собираем свой debian-пакет с файлами](https://debian.pro/1390) | |
[Простейший способ собрать свой deb-пакет с данными (например, с конфигами, скриптами, ключами авторизации)](https://debian.pro/426) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find . -d -name node_modules | while read line; do rm -rf $line; done |