Related Stackoverflow Question:
https://superuser.com/a/206826/55267
Related answer:
https://superuser.com/a/206826/55267
# setup
#!/usr/bin/env python | |
# Find the raw bitstring from a captured Flipper RAW .sub file. | |
# Must provide the bitlength in ms, and the allowable error which can be tolerated. | |
import re | |
import sys | |
import math | |
filename = sys.argv[1] |
Related Stackoverflow Question:
https://superuser.com/a/206826/55267
Related answer:
https://superuser.com/a/206826/55267
# setup
2017-03-03 fm4dd
The gcc compiler can optimize code by taking advantage of CPU specific features. Especially for ARM CPU's, this can have impact on application performance. ARM CPU's, even under the same architecture, could be implemented with different versions of floating point units (FPU). Utilizing full FPU potential improves performance of heavier operating systems such as full Linux distributions.
These flags can both be used to set the CPU type. Setting one or the other is sufficient.
from flask import Flask, abort, request, jsonify, g, url_for, Response, json | |
from flask_sqlalchemy import SQLAlchemy | |
from model.billingmodel import db | |
from model.billingmodel import User, ManagedAccount, VPNTunnel | |
from flask_login import LoginManager, login_required, logout_user, login_user, current_user | |
import logging | |
from logging.handlers import RotatingFileHandler | |
import base64 | |
logger = logging.getLogger(__name__) |
import logging | |
import re | |
from connexion import App | |
from jsonschema import draft4_format_checker | |
MONEY_RE = re.compile('^\$\s*\d+(\.\d\d)?') | |
logging.basicConfig(level=logging.DEBUG) |
# Use Python 3 for easy unicode | |
$ virtualenv -p python3 .env | |
$ source .env/bin/activate | |
$ pip install django | |
$ deactivate | |
# Start new django project and app | |
$ django-admin.py startproject mysite | |
$ ./manage.py migrate | |
$ ./manage.py createsuperuser |
# add pip install/uninstall to requirements.txt automatically | |
pipr() { | |
if [ "$1" == "install" ]; then | |
pip $1 $2 | |
pip freeze | grep -i $2 >> requirements.txt | |
echo ok, added $2 as: | |
tail -n1 requirements.txt | |
fi | |
if [ "$1" == "uninstall" ]; then | |
echo y | pip $1 $2 >> .pipremoved |
#!/bin/bash | |
# This script is used by Nagios to post alerts into a Slack channel | |
# using the Incoming WebHooks integration. Create the channel, botname | |
# and integration first and then add this notification script in your | |
# Nagios configuration. | |
# | |
# All variables that start with NAGIOS_ are provided by Nagios as | |
# environment variables when an notification is generated. | |
# A list of the env variables is available here: |
\ProvidesFile{absender.lco} | |
\KOMAoptions{% | |
% fromemail=true, % Email wird im Briefkopf angezeigt | |
% fromphone=true, % Telefonnumer wird im Briefkopf angezeigt | |
% fromfax=true, % Faxnummer wird im Briefkopf angezeit | |
% fromurl=true, % URL wird im Briefkopf angezeigt | |
% fromlogo=true, % Logo wird im Briefkopf angezeigt | |
% subject=titled, % Druckt "Betrifft: " vor dem Betreff | |
locfield=wide, % Breite Absenderergänzung (location) |