Skip to content

Instantly share code, notes, and snippets.

View tromboneamafone's full-sized avatar

Robert Bevly tromboneamafone

View GitHub Profile
talking points
Django
Pros:
MVC Framework is well tested
Database abstraction
each model is a Python class that subclasses Djangos Model class
each model attribute represents a database field
provides automatically generated db access
ex: for voter in Voter.objects.all():
email(voter)
case 'Ranger #11H - Osprey #22H FRAC':
$response = array(
'data' => '
<div style="font-size:7px">
<div class="title">NMT Id: </div><div id="nmtId">' . $row['nmtId'] . '</div>
<div class="title">Ambient: </div><div id="ambient">' . round($row['ambient'], 1) . 'dB</div>
<div class="title">Allowable: </div><div id="allowable">' . $allowable . '</div>
<div class="title">Location: </div><div id="nmtId">' . $row['location'] . '</div>
</div>
'
@tromboneamafone
tromboneamafone / afterJuly
Created November 27, 2012 02:04
tedious debug info
connected to 192.168.0.113:1433
Sent
type:0x12(PRELOGIN), status:0x01(EOM), length:0x002F, spid:0x0000, packetId:0x01, window:0x00
0000 00001A00 06010020 00010200 21000103 00220004 04002600 01FF0000 00010001 ....... ....!... ."....&. ........
0020 02000000 000000 .......
PreLogin - version:0.0.0.1 1, encryption:0x02(NOT_SUP), instopt:0x00, threadId:0x00000000, mars:0x00(OFF)
State change: Connecting -> SentPrelogin
Received
@tromboneamafone
tromboneamafone / priorJuly
Created November 27, 2012 02:03
tedious debug info
connected to 192.168.0.113:1433
Sent
type:0x12(PRELOGIN), status:0x01(EOM), length:0x002F, spid:0x0000, packetId:0x01, window:0x00
0000 00001A00 06010020 00010200 21000103 00220004 04002600 01FF0000 00010001 ....... ....!... ."....&. ........
0020 02000000 000000 .......
PreLogin - version:0.0.0.1 1, encryption:0x02(NOT_SUP), instopt:0x00, threadId:0x00000000, mars:0x00(OFF)
State change: Connecting -> SentPrelogin
Received
@tromboneamafone
tromboneamafone / gist:4150105
Created November 26, 2012 19:27
tedious test
connected to 192.168.0.113:1433
Sent
type:0x12(PRELOGIN), status:0x01(EOM), length:0x002F, spid:0x0000, packetId:0x01, window:0x00
0000 00001A00 06010020 00010200 21000103 00220004 04002600 01FF0000 00010001 ....... ....!... ."....&. ........
0020 02000000 000000 .......
PreLogin - version:0.0.0.1 1, encryption:0x02(NOT_SUP), instopt:0x00, threadId:0x00000000, mars:0x00(OFF)
State change: Connecting -> SentPrelogin
Received
//email alert for nmt's
//need to determine if auctually connected to enrg sql db
//
//TO-DO: EMAIL http://howtonode.org/sending-e-mails-with-node-and-nodemailer
var Connection = require('tedious').Connection,
Request = require('tedious').Request, //sql monitering dependency
nodemailer = require('nodemailer'); //email dependency
var config = {