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
# Удаление файла из истории git | |
Бывает не продуманный .gitignore, бывает в git попадёт какой нибудь левый бэкапный файлик, бывает что файл с паролем уложился в репку! | |
Если в git добавлен файлик которого там быть не должно, делаем так: | |
`git filter-branch --force --index-filter 'git rm -rf --cached --ignore-unmatch FILE_TO_REMOVE_AND_PRUNE' --prune-empty --tag-name-filter cat -- --all` | |
Если файлик успел уехать в удаленную репу: | |
``` |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
__author__ = "maverick" | |
def monkey_patch(): | |
""" | |
Импортируем модуль logger_monkey_patch и вызываем logger_patch.monkey_patch() | |
Происходит подмена метода emit в StreamHandler и решается проблема: |
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
#!/usr/bin/lftp -f | |
set mirror:parallel-directories true | |
set net:timeout 180 | |
set cmd:parallel 10 | |
set cmd:queue-parallel 15 | |
set mirror:parallel-transfer-count 10 | |
set mirror:use-pget-n 5 | |
# set cmd:show-status false | |
open -u LOGIN:PASSWORD FTP:URI | |
mirror --reverse --skip-noaccess --continue --reverse /SRC/ /DEST/ |
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
FROM centos:latest | |
# based on http://developers.redhat.com/blog/2014/05/05/running-systemd-within-docker-container/ | |
MAINTAINER maverick <[email protected]> | |
RUN yum -y update; yum clean all | |
RUN yum -y install systemd; yum clean all; \ | |
(cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \ | |
rm -f /lib/systemd/system/multi-user.target.wants/*;\ | |
rm -f /etc/systemd/system/*.wants/*;\ | |
rm -f /lib/systemd/system/local-fs.target.wants/*; \ | |
rm -f /lib/systemd/system/sockets.target.wants/*udev*; \ |