brew update
brew install rabbitmq
To see if rabbitmq is running after following the installation instructions:
launchctl list | grep rabbit
> 48303 - homebrew.mxcl.rabbitmq
In python, you have floats and decimals that can be rounded. If you care about the accuracy of rounding, use decimal type. If you use floats, you will have issues with accuracy.
All the examples use demical types, except for the original value, which is automatically casted as a float.
To set the context of what we are working with, let's start with an original value.
from rest_framework import serializers | |
class CharacterSeparatedField(serializers.WritableField): | |
""" | |
A field that separates a string with a given separator into | |
a native list and reverts a list into a string separated with a given | |
separator. | |
""" | |
def __init__(self, *args, **kwargs): |
// Usage: mongo {Server without mongodb:// example 127.0.0.1:27017}/{DbName} [-u {Username}] [-p {Password}] < ./mongo-ls.js | |
var collections = db.getCollectionNames(); | |
print('Collections inside the db:'); | |
for(var i = 0; i < collections.length; i++){ | |
var name = collections[i]; | |
if(name.substr(0, 6) != 'system') | |
print(name + ' - ' + db[name].count() + ' records'); |
The easiest way to load the Mysql Time Zone tables from your Mac OS time zone fields is via this command:
mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root mysql
However, on many systems like mine that will fail because some of the time zone information is incompatible with the database schema for the time zone tables.
Therefore, you'll want to load the time zone information into a text file and edit it to only include the time zones you need. (Or, attempt to find the data breaking the import.)
mysql_tzinfo_to_sql /usr/share/zoneinfo > zone_import.sql
rabbitmqctl add_user test test | |
rabbitmqctl set_user_tags test administrator | |
rabbitmqctl set_permissions -p / test ".*" ".*" ".*" |
# Example makefile with some dummy rules | |
.PHONY: all | |
## Make ALL the things; this includes: building the target, testing it, and | |
## deploying to server. | |
all: test deploy | |
.PHONY: build | |
# No documentation; target will be omitted from help display | |
build: |
#!/bin/bash | |
# | |
# pcap2wav | |
# Original Author: Michael Collins <msc@freeswitch.org> | |
#Standard disclaimer: batteries not included, your mileage may vary... | |
# Updated by Avi Marcus <avi@bestfone.com> | |
# | |
# Accepts arg of pcap file w/only 2 RTP streams | |
# Creates a .<codec> file and a .wav file | |
# For codecs other than PCMA and PCMU the script calls fs_cli and does a little recording to create the wav file(s) |
Exhaustive list of SPDX (Software Package Data Exchange) licenses: https://spdx.org/licenses/