The following are instructions for connecting a Bluetooth device for serial communication on Arch Linux using BlueZ 5.31.
The following packages are required:
bluez
:bluetoothd
bluez-utils
:bluetoothctl
,rfcomm
import base64 | |
from django.core.files.base import ContentFile | |
from rest_framework import serializers | |
class Base64ImageField(serializers.ImageField): | |
def from_native(self, data): | |
if isinstance(data, basestring) and data.startswith('data:image'): | |
# base64 encoded image - decode |
// show pdf in the editor | |
// pdf is uploaded using the video/media button | |
// then its tag is converted from video to pdf at beforeSetContent | |
tinymce.init({ | |
selector: 'textarea#Description', | |
plugins: 'print preview fullpage paste importcss searchreplace autolink autosave save directionality code visualblocks visualchars fullscreen image link media codesample table charmap hr pagebreak nonbreaking anchor toc insertdatetime advlist lists wordcount imagetools textpattern noneditable help charmap quickbars emoticons ', | |
menubar: 'file edit view insert format tools table help', |
#!/bin/bash | |
# Debug | |
set -o xtrace | |
GUEST_IP=192.168.122.221 | |
HOST_IP=192.168.122.1 | |
# Wipe the current usbfluxd, usbmuxd, and socat: | |
sudo killall usbfluxd |
How to generate graphic model Django with PyGraphViz?
sudo apt-get install -y graphviz libgraphviz-dev pkg-config
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
pip install pygraphviz
pip uninstall pyparsing
pip install -Iv https://pypi.python.org/packages/source/p/pyparsing/pyparsing-1.5.7.tar.gz#md5=9be0fcdcc595199c646ab317c1d9a709
const dotenv = require("dotenv"); | |
let ENV_FILE_NAME = ""; | |
switch (process.env.NODE_ENV) { | |
case "production": | |
ENV_FILE_NAME = ".env.production"; | |
break; | |
case "staging": | |
ENV_FILE_NAME = ".env.staging"; | |
break; |