Skip to content

Instantly share code, notes, and snippets.

View boyxuper's full-sized avatar

Weizheng Xu boyxuper

  • SOHU mobile
  • Beijing, China
View GitHub Profile
@angelo510
angelo510 / clientController.js
Created January 24, 2017 15:20
AngularJS Controller file which controls Guacamole
/**
* The controller for the page used to connect to a connection or balancing group.
*/
angular.module('client').controller('clientController', ['$scope', '$routeParams', '$injector',
function clientController($scope, $routeParams, $injector) {
// Required types
var ManagedClient = $injector.get('ManagedClient');
var ManagedClientState = $injector.get('ManagedClientState');
var ManagedFilesystem = $injector.get('ManagedFilesystem');
@jlong
jlong / uri.js
Created April 20, 2012 13:29
URI Parsing with Javascript
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"