View package.json
{ | |
"name":"update-dtm" | |
,"version":"0.1.0" | |
,"dependencies":{ | |
"request":"2.x.x" | |
} | |
,"devDependencies":{} | |
} |
View sqltext.coffee
# Without the anonymous function wrapper, it seemed to only export the first value. | |
(-> | |
exports.getTopOfQueue = """ | |
SELECT TOP 10 | |
[Id],[CreatedOn],[LastAttemptOn],[Application],[Class],[From],[To],[Subject],[BodyUrl],[BodyHtml],[JsonDetails] | |
FROM [EmailQueue] | |
WHERE [LastAttemptOn] < DATEADD(m, -15, SYSUTCDATETIME()) | |
ORDER BY [Id] | |
""" |
View CardReader.js
var EventEmitter = require("events").EventEmitter; | |
var util = require("util"); | |
module.exports = CardReader; | |
//the export is essentially a self-healing wrapper around the external interface... | |
function CardReader() { | |
var that = this, someProc = null; | |
loadProc(); | |
function loadProc() { |
View _Layout.cshtml
@functions{ | |
string currentController = null; | |
string currentAction = null; | |
string currentModel = null; | |
private void InitVars() { | |
ViewBag.Phone = phone; | |
currentController = ViewContext.RouteData.Values["Controller"].ToString().ToLower(); | |
currentAction = ViewContext.RouteData.Values["Action"].ToString().ToLower(); |
View UnityUtil.cs
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using Microsoft.Practices.Unity; | |
using Microsoft.Practices.Unity.Configuration; | |
using System.Configuration; | |
using System.ServiceModel; | |
using System.ServiceModel.Web; | |
using System.Runtime.Serialization; |
View TestUtility.cs
using System; | |
using System.Collections.Generic; | |
using System.Configuration; | |
using System.Data.Entity; | |
using System.Data.EntityClient; | |
using System.Data.Metadata.Edm; | |
using System.Data.SqlServerCe; | |
using System.IO; | |
using System.Linq; | |
using System.Reflection; |
View DockerCheatSheet.sh
base image tracker1/nodejs -- ubuntu 12.04 w/ python 2.7, build tools and nodejs 0.10.22 | |
build docker app, from app dir :tagname | |
sudo docker build -t tracker1/nodejs-demo:1 . | |
run docker app in bg / -p ### will create random forward for port X | |
-d is daemon mode, or & at the end for background | |
sudo docker run -d -name demo1 tracker1/nodejs-demo:1 |
View router-admin-scripts.sh
#Setup bridge for guest wifi (br1) with separate subnet/dhcp | |
# setup virtual wifi wlan0.1 | |
#the following rules go under administration -> scripts -> firewall then reboot after saving | |
#NOTE: -I inserts at the beginning be default, so restrictive rules at the top, permissive at the bottom. | |
#default deny guest | |
iptables -I FORWARD -i br1 -j DROP | |
#Removes guest access to physical network |
View etc-network-interfaces
# This file describes the network interfaces available on your system | |
# and how to activate them. For more information, see interfaces(5). | |
# The loopback network interface | |
auto lo | |
iface lo inet loopback | |
# The primary network interface | |
auto eth0 |
OlderNewer