Right Left Center Default
------- ------ ---------- -------
12 12 12 12
123 123 123 123
1 1 1 1
Table: Demonstration of simple table syntax.
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
import java.io.*; | |
import java.net.*; | |
public class TestConnection { | |
public static void main(String[] args) throws IOException { | |
if (args.length == 0) { | |
System.err.println("Usage " + TestConnection.class.getCanonicalName() + " <url>"); | |
System.exit(-1); | |
} | |
URL url = new URL(args[0]); |
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
var e164 = require('e164'), assert = require('assert'); | |
assert.equal("Canada", e164.lookup('15141234567')); | |
assert.equal("Toll Free", e164.lookup('18001231234')); | |
assert.equal("United State", e164.lookup('18703434345')); | |
assert.equal("India", e164.lookup('9191')); | |
assert.equal("Norfolk Island", e164.lookup('672322424')); | |
assert.equal("ICO Global (Mobile Satellite Service)", e164.lookup('88112311')); | |
assert.equal("Canada", e164.lookup('1418')); | |
assert.equal(undefined, e164.lookup('0')); |
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
<script src="e164.min.js"></script> | |
<!-- | |
<script src="e164.js"></script> | |
--> | |
<script> | |
console.log(e164.lookup('15145551234')); | |
</script> |
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
# set a random unique hostname to limit name collision | |
hostname=$(uuidgen | md5sum );hostname=${hostname:0:8}; | |
hostname=nc-${hostname} | |
hostname $hostname | |
sed -i s/^HOSTNAME=.*$/HOSTNAME=${hostname}/g /etc/sysconfig/network | |
sed -i s/^DHCP_HOSTNAME=.*$/DHCP_HOSTNAME=${hostname}/g /etc/sysconfig/network-scripts/ifcfg-eth0 | |
#with=" supersede host-name \"${hostname}\";" | |
#echo $with | |
#sed -i 's/^.*supersede\\shost-name.*$/${with}/g' /etc/dhclient.conf |
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
VERBOSE=true | |
ASTERISK_LOAD_SCRIPT='/usr/bin/asterisk-load' | |
ASTERISK_ETC='/etc/asterisk' | |
AVAILABLE=ASTERISK_ETC + "/available" | |
ENABLED=ASTERISK_ETC + "/enabled" | |
DISABLED=ASTERISK_ETC + "/disabled" | |
directory AVAILABLE |
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
#!/bin/bash | |
if [ -e /etc/asterisk/enabled/$1.conf ] ; then | |
echo "#include /etc/asterisk/enabled/$1.conf"; | |
fi | |
if [ -e /etc/asterisk/enabled/$1/ ] ; then | |
find /etc/asterisk/enabled/$1/ -name '*.conf' -exec echo "#include {}" \; | |
fi |
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
context multi-provider { | |
_X. => { | |
if (${GLOBAL(provider_1_limit)} > ${GLOBAL(provider_1_count)}) { | |
Set(PROVIDER_CONTEXT=provider_1); | |
} | |
else if (${GLOBAL(provider_2_limit)} > ${GLOBAL(provider_2_count)}) { | |
Set(PROVIDER_CONTEXT=provider_2); | |
} | |
else { | |
Congestion(); |
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
globals { | |
// configure the limits for each provider | |
provider_1_limit=1; | |
provider_2_limit=4; | |
// no more edit beyond this point | |
provider_1_count=0; | |
provider_2_count=0; | |
}; |
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
[provider_1] | |
type=peer | |
host=192.168.137.56 | |
dtmfmode=inband | |
canreinvite=no | |
qualify=1000 | |
disallow=all | |
allow=ulaw | |
[provider_2] |