Skip to content

Instantly share code, notes, and snippets.

View volkovasystems's full-sized avatar
🏠
Working from home

Richeve S. Bebedor volkovasystems

🏠
Working from home
  • volkovasystem
  • Philippines
View GitHub Profile
@volkovasystems
volkovasystems / simComponentDialog.js
Created January 6, 2015 06:13
simComponentDialog implementation for instance parameters configuring VNAM of CSW Switch
/**
* Created with IntelliJ IDEA.
* User: richevebebedor
* Date: 12/12/14
* Time: 2:58 PM
* To change this template use File | Settings | File Templates.
*/
/**
* Function: simComponentDlg
@volkovasystems
volkovasystems / meta.js
Last active August 29, 2015 14:13
Meta class for handling parameter checks.
angular
.module( "Meta", [ ] )
.factory( "Meta", [
function factory( ){
var Meta = function Meta( parameterList, ruleSet ){
this.parameterList = parameterList;
this.ruleSet = ruleSet;
@volkovasystems
volkovasystems / json-http.js
Last active August 29, 2015 14:13
Basic JSON XMLHttpRequest implementation.
var jsonHttp = function jsonHttp( ){
var xmlHttpEngine = {
"xmlHttp": new XMLHttpRequest( )
};
var requestSet = {
"querySet": { },
"parameterSet": { },
"headerSet": {
"Content-Type": "application/json;charset=UTF-8"
@volkovasystems
volkovasystems / expand-command
Created January 22, 2015 05:07
Expand command
find . -iname '*.less' ! -type d -exec bash -c 'expand -t 4 "$0" > e && mv e "$0"' {} \;
@volkovasystems
volkovasystems / 0_reuse_code.js
Last active August 29, 2015 14:14
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@volkovasystems
volkovasystems / when.js
Last active August 29, 2015 14:14
Condition based event driven library.
var when = function when( condition ){
if( !( "namespaces" in when ) ){
when.namespaces = { };
}
if( !( "methods" in when ) ){
when.methods = { };
}
var data = {
@volkovasystems
volkovasystems / example.js
Created February 10, 2015 08:20
Testing Dependency Injected Functions
/**
* Copyright: Aspen Labs, LLC. 2011
* User: kutenai
* Date: 10/7/13
* Time: 12:29 AM
*/
/**
* Shared top-level controller. This controller handles the single-open
* state of the level1 Categories.
@volkovasystems
volkovasystems / example2.js
Created February 10, 2015 08:25
Testing Dependency Injected Functions
function( $scope, $attrs ){
this.groups = [ ];
this.closeOthers = function( openGroup ){
angular.forEach( this.groups,
function( group ){
if( group !== openGroup ){
group.isOpen = false;
}
} );
@volkovasystems
volkovasystems / example3.js
Created February 10, 2015 09:18
Testing Dependency Injected Functions
//Let's assume this is inside a qunit setup function.
//First we create our environment
var window = {
//Pass all global variables here.
//You can also attach mocks here.
"angular": {
"forEach": _.each
}
}
@volkovasystems
volkovasystems / module-documentation
Created May 28, 2016 19:08
Module Documentation
/*:
@module-license:
The MIT License (MIT)
@mit-license
Copyright (@c) 2016 Richeve Siodina Bebedor
@email: [email protected]
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal