This file contains hidden or 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
local uv = require "lluv" | |
uv.rs232 = require "lluv.rs232" | |
local sockets = {} | |
local port = uv.rs232('COM4',{ | |
baud = '_9600'; | |
data_bits = '_8'; | |
parity = 'NONE'; | |
stop_bits = '_1'; |
This file contains hidden or 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
local FS_DIR = 'c:/FreeSWITCH' | |
local FUSION_DIR = 'c:/wamp/www/fusionpbx' | |
local NGINX_DIR = 'c:/nginxwin' | |
local PHP_DIR = NGINX_DIR .. '/php_5.4' | |
-- local PASSWORD = '' -- password to pgsql (optional) | |
-- local BACKUP_DIR = '' -- target directory (default cwd) | |
----------------------------------------------------------- | |
local path = require "path" | |
local date = require "date" |
This file contains hidden or 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
-- to run test | |
-- * copy file to ${script_dir}\cache_perf.lua | |
-- * in some domain create varialble | |
-- category: test | |
-- subcategory: test | |
-- type: bool | |
-- value: false | |
-- * copy domain uuid to `domain_uuid` variable | |
-- * from fs_cli run `lua cache_perf.lua 1000` | |
-- (1000 is number of iteration) |
This file contains hidden or 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
<?xml version="1.0"?> | |
<document type="freeswitch/xml"> | |
<X-PRE-PROCESS cmd="set" data="local_address=192.168.123.58"/> | |
<X-PRE-PROCESS cmd="set" data="local_port=5064"/> | |
<X-PRE-PROCESS cmd="set" data="domain_name=$${local_address}"/> | |
<X-PRE-PROCESS cmd="set" data="external_address=$${local_address}"/> | |
<X-PRE-PROCESS cmd="set" data="external_port=5088"/> | |
<section name="configuration"> |
This file contains hidden or 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
ZMQ Version: 4 2 0 | |
Timer recv: hello #1 | |
Timer recv: hello #2 | |
Timer recv: hello #3 | |
Timer recv: hello #4 | |
No messages ([ZMQ][EAGAIN] Resource temporarily unavailable (11)) | |
Poll recv: hello #5 | |
Poll recv: hello #6 | |
Poll recv: hello #7 | |
Poll recv: hello #8 |
This file contains hidden or 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
/* vim: set et sw=3 tw=0 fo=croqlaw cino=t0: | |
* | |
* Luaxx, the C++ Lua wrapper library. | |
* Copyright (c) 2006-2007 Matthew A. Nicholson | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to | |
* deal in the Software without restriction, including without limitation the | |
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or | |
* sell copies of the Software, and to permit persons to whom the Software is |
This file contains hidden or 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
#ifndef __BZMSG_H_INCLUDED__ | |
#define __BZMSG_H_INCLUDED__ | |
#include <zmq.hpp> | |
#include <vector> | |
#include <list> | |
#include <iostream> | |
#include <iomanip> | |
#include <string> |
This file contains hidden or 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
local reallib | |
local fakelib | |
local machine | |
local extrasymbols = {} | |
local args = {...} | |
local errmsg | |
if args[1] then reallib = args[1] end | |
if args[2] then fakelib = args[2] end | |
if args[3] then machine = args[3] end |
This file contains hidden or 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
J = path.join | |
function dasc_target(t) | |
local DASC = LUA_EXE .. ' ' .. path.join('dynasm', 'dynasm.lua') | |
local dasc_h = {} | |
for name, args in pairs(t) do | |
local dasc = target(name .. ".h", args[1] .. ".dasc", DASC .. ' ' .. (args[2] or "") .. ' -o $(TARGET) $(DEPENDS) ') | |
table.insert(dasc_h, dasc) | |
end | |
return dasc_h |
This file contains hidden or 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
-- make and install lua -- | |
1. Download install http://mingw-w64.sourceforge.net/download.php | |
2. Download and unpack Lua source (http://www.lua.org/ftp) | |
Tested on Lua 5.1.5 and 5.2.2 | |
3. Make Lua | |
- run mingw builds terminal | |
- cd to lua src dir | |
- run mingw32-make mingw |