apt install bind9
Note: i have the IP : 192.168.1.109 by DHCP
edit the network settings file
| #!flask/bin/python | |
| from flask import Flask, jsonify, abort, request, make_response, url_for | |
| from flask.ext.httpauth import HTTPBasicAuth | |
| app = Flask(__name__, static_url_path = "") | |
| auth = HTTPBasicAuth() | |
| @auth.get_password | |
| def get_password(username): | |
| if username == 'miguel': |
| import mimerender | |
| mimerender.register_mime('pdf', ('application/pdf',)) | |
| mimerender = mimerender.FlaskMimeRender(global_charset='UTF-8') | |
| def render_pdf(html): | |
| from xhtml2pdf import pisa | |
| from cStringIO import StringIO | |
| pdf = StringIO() | |
| pisa.CreatePDF(StringIO(html.encode('utf-8')), pdf) |
| import os | |
| PATH = path/to/my/blueprints/directory | |
| BLUEPRINT = 'the_blueprint' | |
| def import_file(path, name=None): | |
| """ imports a file with given name and path """ | |
| # use the imp module to do actual imports | |
| import imp | |
| name = name or os.path.split(path)[-1].replace(".", "_") |
| #!/usr/bin/env python2.7 | |
| # -*- coding: utf-8 -*- | |
| # | |
| # Sending a SMS with Python and pyserial via an USB 3G Modem on pfSense/FreeBSD | |
| # tested with: Huawei Technologies Co., Ltd. E620 USB Modem | |
| # and a Telekom SIM card | |
| import serial | |
| from curses import ascii | |
| import time |
| #!/usr/bin/python | |
| # -*- coding: utf-8 -*- | |
| __author__ = 'efrenfuentes' | |
| MONEDA_SINGULAR = 'guarani' | |
| MONEDA_PLURAL = 'guaranies' | |
| CENTIMOS_SINGULAR = 'centimo' |
See this issue.
Docker best practise to Control and configure Docker with systemd.
Create daemon.json file in /etc/docker:
{"hosts": ["tcp://0.0.0.0:2375", "unix:///var/run/docker.sock"]}
| First "gem install sass" on console | |
| Go Menu File > Settings > Tools > File Watch > "+" > "sass" | |
| On New Window > Section Watcher Settings | |
| Program: /<home-directory>/.gem/ruby/2.5.0/bin/sass | |
| Arguments: --no-cache --update --no-cache --update $FileName$:../css/$FileNameWithoutExtension$.css --style compressed | |
| Compile sass file on folder css on file minified |
| LOCAL_PATH:= $(call my-dir) | |
| include $(CLEAR_VARS) | |
| LOCAL_SRC_FILES:= \ | |
| gps_test.cpp | |
| LOCAL_SHARED_LIBRARIES := \ | |
| libcutils libhardware | |
| LOCAL_MODULE:= test-gps |