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
/* | |
requirejs.config({ | |
paths: { | |
'ymaps': ['//api-maps.yandex.ru/2.0-stable/?load=package.standard&lang=ru-RU'] | |
}, | |
shim: { | |
'ymaps': {exports: 'ymaps'} | |
} | |
}); | |
*/ |
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
func Vermut() *martini.ClassicMartini { | |
r := martini.NewRouter() | |
m := martini.New() | |
m.Use(martini.Logger()) | |
m.Use(martini.Recovery()) | |
// pass cached images to thumbnailer | |
m.Use(NewThumbnailer("public")) | |
cache := martini.NewRouter() | |
cache.Group("/cache", cacheHandler) |
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://web.skype.com <- all what you need | |
# dpkg --add-architecture i386 | |
# add-apt-repository "deb http://archive.canonical.com/ $(lsb_release -sc) partner" | |
# add-apt-repository ppa:skype-wrapper/ppa | |
# apt-get update | |
# apt-get install skype skype-wrapper sni-qt:i386 | |
# apt-mark auto sni-qt:i386 | |
# apt-get install gtk2-engines-murrine:i386 gtk2-engines-pixbuf:i386 | |
# TODO add app-arrmor |
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
/var/lib/docker/containers/*/*.log { | |
rotate 7 | |
daily | |
compress | |
delaycompress | |
copytruncate | |
sharedscripts | |
postrotate | |
/usr/bin/docker restart forwarder | |
endscript |
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
--- | |
- hosts: localhost | |
connection: local | |
# gather_facts: no | |
become: yes | |
vars: | |
- interfaces: ["lo", "docker0"] | |
tasks: | |
- name: install dnsmasq |
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://stackoverflow.com/questions/39320371/how-start-web-server-to-open-page-in-browser-in-golang | |
// open opens the specified URL in the default browser of the user. | |
func open(url string) error { | |
var cmd string | |
var args []string | |
switch runtime.GOOS { | |
case "windows": | |
cmd = "cmd" | |
args = []string{"/c", "start"} |
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
# Create a container from the mongo image, | |
# run is as a daemon (-d), expose the port 27017 (-p), | |
# set it to auto start (--restart) | |
# and with mongo authentication (--auth) | |
# Image used is https://hub.docker.com/_/mongo/ | |
docker pull mongo | |
docker run --name YOURCONTAINERNAME --restart=always -d -p 27017:27017 mongo mongod --auth | |
# Using the mongo "localhost exception" (https://docs.mongodb.org/v3.0/core/security-users/#localhost-exception) | |
# add a root user |
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
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<title>STL File Viewer</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r68/three.min.js" | |
></script> | |
<script src="https://rawgit.com/mrdoob/three.js/master/examples/js/controls/TrackballControls.js" | |
></script> | |
<script src="loader.js"></script> |
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
# luci > net > firewall > custom_rules | |
# | |
# add modem (eth1) to lan bridge | |
# | |
# drop modem dhcp (modem is static 192.168.1.2) | |
iptables -A input_lan_rule -p udp --src 192.168.1.2 --destination-port 68 -j DROP | |
iptables -A forwarding_lan_rule -p udp --src 192.168.1.2 --destination-port 68 -j DROP |
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
[Service] | |
LimitSTACK=infinity | |
# mkdir /etc/systemd/system/php-fpm.service.d | |
# cd /etc/systemd/system/php-fpm.service.d | |
# vi ulimit.conf | |
# systemctl daemon-reload | |
# systemctl restart php-fpm |
OlderNewer