Skip to content

Instantly share code, notes, and snippets.

View 08euccs014's full-sized avatar
πŸ‘·β€β™‚οΈ
Man at work

Mohit Agrawal 08euccs014

πŸ‘·β€β™‚οΈ
Man at work
  • Sr. Technical Lead @ A3Logics Pvt. Ltd.
  • Jaipur
View GitHub Profile
import {Injectable, provide} from 'angular2/core';
import {Observable} from 'rxjs';
const GEOLOCATION_ERRORS = {
'errors.location.unsupportedBrowser': 'Browser does not support location services',
'errors.location.permissionDenied': 'You have rejected access to your location',
'errors.location.positionUnavailable': 'Unable to determine your location',
'errors.location.timeout': 'Service timeout has been reached'
};
@08euccs014
08euccs014 / nodejs-tcp-example.js
Created February 10, 2016 13:52 — forked from tedmiston/nodejs-tcp-example.js
Node.js tcp client and server example
/*
In the node.js intro tutorial (http://nodejs.org/), they show a basic tcp
server, but for some reason omit a client connecting to it. I added an
example at the bottom.
Save the following server in example.js:
*/
var net = require('net');
@08euccs014
08euccs014 / HSV-to-RGB.php
Created November 7, 2015 11:41
PHP function for converting HSV colours to RGB colours
<?php
/*
** Converts HSV to RGB values
** –––––––––––––––––––––––––––––––––––––––––––––––––––––
** Reference: http://en.wikipedia.org/wiki/HSL_and_HSV
** Purpose: Useful for generating colours with
** same hue-value for web designs.
** Input: Hue (H) Integer 0-360
** Saturation (S) Integer 0-100