This file contains 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
# Driver (leave uncommented ONLY the line with the name of the driver) | |
#T= mysql | |
#T= oci8 | |
#T= odbc | |
T= postgres | |
#T= sqlite | |
#T=sqlite3 | |
#T=firebird | |
# Installation directories |
This file contains 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 | |
# | |
# Install LuaSQL on Debian7 | |
# | |
#Install Dependencies | |
apt-get install -y lua5.2 liblua5.2-dev | |
apt-get install -y libpq-dev | |
#apt-get install lua-sql-postgres-dev |
This file contains 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
#!/usr/bin/env python | |
""" | |
- Search Github for repos, return results and clone via menu selection. | |
- Created because we all spend far too much time looking for the repo addresses. | |
- Requires 'requests' lib, install on deb system with: sudo apt-get install python-pip; sudo pip install requests | |
- sudo wget https://gist.github.com/LukeBeer/9bb732dd6129ebd92fdc/raw/gitget.py -O /usr/local/bin/gitget; sudo chmod +x /usr/local/bin/gitget | |
""" | |
import sys |
This file contains 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
#!/usr/bin/env python | |
""" | |
Install a package from your local pip download cache without having to touch | |
the 'net at all. | |
You'll need to be using a pip download cache; that is, you'll need the | |
following in your ~/.pip/pip.cfg: | |
[install] |
This file contains 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
# | |
# Display PI Number | |
# | |
def make_pi(): | |
q, r, t, k, m, x = 1, 0, 1, 1, 3, 3 | |
for j in range(10000): | |
if 4 * q + r - t < m * t: | |
yield m | |
q, r, t, k, m, x = 10*q, 10*(r-m*t), t, k, (10*(3*q+r))//t - 10*m, x |
This file contains 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
prefixlist = range(0, 100) | |
rate_list = VoIPRetailRate.objects.values('prefix', 'retail_rate', 'prefix__destination').filter(prefix__in=[int(s) for s in prefixlist]) | |
print rate_list | |
This file contains 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
diff --git a/src/switch_core_sqldb.c b/src/switch_core_sqldb.c | |
index d436c60..6ec8792 100644 | |
--- a/src/switch_core_sqldb.c | |
+++ b/src/switch_core_sqldb.c | |
@@ -1254,14 +1254,15 @@ static void core_event_handler(switch_event_t *event) | |
break; | |
} | |
case SWITCH_EVENT_CHANNEL_CREATE: | |
- new_sql() = switch_mprintf("insert into channels (uuid,direction,created,created_epoch, name,state,callstate,dialplan,context,hostname) " | |
- "values('%q','%q','%q','%ld','%q','%q','%q','%q','%q','%q')", |
This file contains 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
diff --git a/src/switch_core_sqldb.c b/src/switch_core_sqldb.c | |
index d436c60..b9a920a 100644 | |
--- a/src/switch_core_sqldb.c | |
+++ b/src/switch_core_sqldb.c | |
@@ -1254,14 +1254,15 @@ static void core_event_handler(switch_event_t *event) | |
break; | |
} | |
case SWITCH_EVENT_CHANNEL_CREATE: | |
- new_sql() = switch_mprintf("insert into channels (uuid,direction,created,created_epoch, name,state,callstate,dialplan,context,hostname) " |
This file contains 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
# | |
# PhoneGap is available under *either* the terms of the modified BSD license *or* the | |
# MIT License (2008). See http://opensource.org/licenses/alphabetical for full text. | |
# | |
# Copyright (c) 2011, IBM Corporation | |
# | |
#------------------------------------------------------------------------------- | |
help: | |
@echo make targets available: |
This file contains 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
# -*- coding: utf-8 -*- | |
from telephonie.core.inboundsocket import InboundEventSocket | |
from telephonie.core.errors import ConnectError | |
from telephonie.utils.logger import StdoutLogger | |
import gevent.event | |
import random | |
random.seed() | |