$ uname -r
This file contains hidden or 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
systemctl status freeswitch # - show status freeswitch | |
systemctl restart freeswitch # - restart freeswitch | |
journalctl -u freeswitch # - show last logs for freeswitch |
This file contains hidden or 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
systemctl status freeswitch # - show status freeswitch | |
systemctl restart freeswitch # - restart freeswitch | |
journalctl -u freeswitch # - show last logs for freeswitch |
This file contains hidden or 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
include .env | |
PROJECTNAME=$(shell basename "$(PWD)") | |
# Go related variables. | |
GOBASE=$(shell pwd) | |
GOPATH="$(GOBASE)/vendor:$(GOBASE)" | |
GOBIN=$(GOBASE)/bin | |
GOFILES=$(wildcard *.go) |
This file contains hidden or 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
function DOMtoString(document_root) { | |
var html = '', | |
node = document_root.firstChild; | |
while (node) { | |
switch (node.nodeType) { | |
case Node.ELEMENT_NODE: | |
html += node.outerHTML; | |
break; | |
case Node.TEXT_NODE: | |
html += node.nodeValue; |
This file contains hidden or 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
# Clone entire site. | |
wget --content-disposition --execute robots=off --recursive --no-parent --continue --no-clobber http://example.com | |
# Remove query string from a static resource. | |
for i in `find $1 -type f -name "*\?*"`; do mv $i `echo $i | cut -d? -f1`; done |
This file contains hidden or 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 ./ -type f -daystart -mtime +30 | xargs -d "\n" tar -czvf backup.tar.gz |
This file contains hidden or 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
Для переноса создадим для начала папочку, в которую сложим дампы баз: | |
mkdir mongo | |
Создаем дамп первой базы: | |
mongodump -h localhost -u admin -p _password_ --authenticationDatabase admin -d _first_db_ -o mongo | |
Создаем дамп второй базы: |