Skip to content

Instantly share code, notes, and snippets.

public void GetPushUri()
{
Channel = HttpNotificationChannel.Find(CHANNEL_NAME);
if (Channel != null)
{
System.Diagnostics.Debug.WriteLine("Channel URI: " + Channel.ChannelUri.ToString());
}
else
{
Channel = new HttpNotificationChannel(CHANNEL_NAME);
@bendiksolheim
bendiksolheim / gist:6726702
Last active December 24, 2015 01:50
npm install error
C:\dev\tmp\test>npm install karma
npm WARN package.json [email protected] No description
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No README data
npm http GET https://registry.npmjs.org/karma
npm http 304 https://registry.npmjs.org/karma
npm http GET https://registry.npmjs.org/di
npm http GET https://registry.npmjs.org/socket.io
npm http GET https://registry.npmjs.org/colors/0.6.0-1
npm http GET https://registry.npmjs.org/chokidar
@bendiksolheim
bendiksolheim / gist:6779446
Last active December 24, 2015 09:49
npm install error (node 0.10.20)
C:\dev\tmp\test>npm install karma
npm WARN package.json [email protected] No description
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No README data
npm http GET https://registry.npmjs.org/karma
npm http 304 https://registry.npmjs.org/karma
npm http GET https://registry.npmjs.org/di
npm http GET https://registry.npmjs.org/rimraf
npm http GET https://registry.npmjs.org/colors/0.6.0-1
npm http GET https://registry.npmjs.org/socket.io
@bendiksolheim
bendiksolheim / gist:6779506
Last active July 14, 2018 07:07
npm install error with silly logging (node 0.10.20)
This file has been truncated, but you can view the full file.
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files (x86)\\nodejs\\\\node.exe',
1 verbose cli 'C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'install',
1 verbose cli 'karma' ]
2 info using [email protected]
3 info using [email protected]
4 verbose node symlink C:\Program Files (x86)\nodejs\\node.exe
5 warn package.json [email protected] No description
6 warn package.json [email protected] No repository field.
C:\dev\tmp\test>npm cache clean
C:\dev\tmp\test>npm install [email protected]
npm WARN package.json [email protected] No description
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No README data
npm http GET https://registry.npmjs.org/zeparser/0.0.5
npm http 200 https://registry.npmjs.org/zeparser/0.0.5
npm http GET https://registry.npmjs.org/zeparser/-/zeparser-0.0.5.tgz
npm http 200 https://registry.npmjs.org/zeparser/-/zeparser-0.0.5.tgz
@bendiksolheim
bendiksolheim / gist:6863268
Created October 7, 2013 06:20
npm install [email protected] (silly logging)
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\\\node.exe',
1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'install',
1 verbose cli '[email protected]' ]
2 info using [email protected]
3 info using [email protected]
4 verbose node symlink C:\Program Files\nodejs\\node.exe
5 warn package.json [email protected] No description
6 warn package.json [email protected] No repository field.
var cron = require('cron').CronJob; //https://github.com/ncb000gt/node-cron
var http = require('http');
var counter = 0;
http.createServer(function(req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Counter : ' + counter + '\n');
}).listen(8181);
@bendiksolheim
bendiksolheim / ViewController.m
Created January 20, 2015 15:05
Play video in UIView
#import "ViewController.h"
#import <QuartzCore/QuartzCore.h>
#import <AVFoundation/AVFoundation.h>
@interface ViewController ()
@end
@implementation ViewController