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
<!DOCTYPE html> | |
<html ng-app="demoApp"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width"> | |
<script src="../gronic-ui/js/gronic-bundle.js"></script> | |
<link rel="stylesheet" href="../gronic-ui/css/gronic.css"> | |
</head> | |
<body ng-controller="DemoCtrl" ng-keydown="onKeypress($event)"> |
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
isNodeWebkit = (typeof process !== "undefined") ; | |
$("body").append('<canvas id="printCanvas" width="384" height="'+ canvasHeight + '"></canvas>'); | |
var canvas = document.getElementById('printCanvas'); | |
this.drawCanvas(canvas,order, function(){ | |
if(isNodeWebkit){ | |
fs = require("fs"); | |
var exec = require("child_process").exec; | |
var __dirname = process.cwd(); |
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
isNodeWebkit = (typeof process !== "undefined") ; | |
$("body").append('<canvas id="lcdCanvas" width="128" height="64"></canvas>'); | |
var canvas = document.getElementById('lcdCanvas'); | |
this.drawCanvas(canvas, function(){ | |
if(isNodeWebkit){ | |
fs = require("fs"); | |
var exec = require("child_process").exec; | |
var __dirname = process.cwd(); |
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
$scope.$on('$viewContentLoaded', function() { | |
$scope._style = document.createElement('link'); | |
$scope._style.type = 'text/css'; | |
$scope._style.href = 'application/Invoice/Resource/single.css'; | |
$scope._style.rel = 'stylesheet'; | |
$scope._style = document.head.appendChild($scope._style); | |
}); | |
$scope.$on('$destroy', function() { |
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 http = require('http'); | |
var tessel = require('tessel'); | |
var led1 = tessel.led[0]; | |
var led2 = tessel.led[1]; | |
setTimeout(function start () { | |
http.createServer(function (req, res) { | |
res.writeHead(200, {'Content-Type': 'text/plain'}); | |
led1.toggle(); | |
led2.toggle(); | |
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
DWORD GetPrinterStatus(unsigned char* bufferRecv,const DWORD dwSize,DWORD* dwRead) | |
{ | |
DWORD dwErr = SUCCESS; | |
//send DLE EOT request | |
//THIS IS WORKING | |
dwErr = WriteDeviceIf0((unsigned char*)"\x10\x04\x14", 3); | |
// return an error in write function |
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
function getErrorObject(){ | |
try { | |
throw Error('') | |
} | |
catch(err) { | |
return err; | |
} | |
} |
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 express = require('express.io'); | |
var http = require('http'); | |
var path = require('path'); | |
var MongoStore = require('connect-mongo')(express); | |
var routes = require('./routes'); | |
var app = express().http().io(); | |
// all environments | |
app.set('port', process.env.PORT || 3000); | |
app.set('views', __dirname + '/views'); |
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 express = require('express'); | |
var app = express(); | |
var dynAddress = null; | |
var dynPort = ""; | |
app.get("/reg", function(req,res){ | |
if(req.query.port) | |
dynPort = req.query.port; |
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 | |
wait=true | |
while $wait | |
do | |
sleep 1 | |
ready=$(curl -sL -w "%{http_code}\\n" $1 -o /dev/null) | |
if [ $ready -eq 200 ] | |
then | |
wait=false | |
fi |