Skip to content

Instantly share code, notes, and snippets.

View MasoodGit's full-sized avatar

Mohamed Masood Alam MasoodGit

View GitHub Profile
app.directive("panelWidgetResourceSend", ["$http", "$rootScope", "$timeout", function($http) {
return {
restrict: "A",
controller: ["$scope", "$element", function($scope, $element) {
$scope.sent = !1,
$scope.sending = !1,
$scope.failed = !1,
$scope.sendResource = function($event) {
if ($scope.resource) {
if ($scope.resource.$invalid) {
@MasoodGit
MasoodGit / vagrantfile
Created December 12, 2015 06:28
vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
@MasoodGit
MasoodGit / Deck of cards
Created December 16, 2015 10:35
Deck of cards , using class Card and Deck
class Card
attr_accessor :rank, :suit
def initialize(rank, suit)
self.rank = rank
self.suit = suit
end
def output_card
return "Card: #{self.rank} of #{self.suit}"
@MasoodGit
MasoodGit / image_blur.rb
Last active December 19, 2015 01:33
image_blur#1
class Image
def initialize(data)
@data = data
end
def output_image
@data.each do |row|
str = ""
@MasoodGit
MasoodGit / Node.rb
Created January 4, 2016 09:16
Sample class in ruby
class Node
attr_accessor :info , :left , :right
def initialize (info,left,right)
@info = info
@left = left
@right = right
end
end
(function () {
'use strict';
angular.module('remoteMonitorApp').controller('dashboardController', dashboardController);
dashboardController.$inject = ['$rootScope','$http','$state','$scope','$stateParams','deviceListService'];
function dashboardController($rootScope,$http,$state,$scope,$stateParams,deviceListService) {
deviceListService.getDeviceList().then( function(res) {
describe('LogService should log ', function() {
var logger;
var logService;
var LogServiceProviderObj;
beforeEach(module('ccLogService'));
//load the provider
beforeEach(function() {
module(function(LogServiceProvider) {
@MasoodGit
MasoodGit / Dockerfile
Last active March 11, 2016 05:23
Dockerfile : Jenkins container, with gradle, nodejs, npm and postgres installations
# Dockerfile, installs gradle , nodejs, npm and postgress on jenkins base image
FROM jenkins
MAINTAINER "phoenix"
USER root
# Set proxy if needed
ENV http_proxy ""
ENV https_proxy ""
1. pact install the_silver_searcher
2. update the vimrc/ctrlp vim plugin
" Make CtrlP use ag for listing the files. Way faster and no useless files.
let g:ctrlp_user_command = 'ag %s -l --hidden --nocolor -g ""'
let g:ctrlp_use_caching = 0
3. Add .agignore similar to .gitignore
@MasoodGit
MasoodGit / scrollbar
Created August 16, 2016 05:02
style scrollbar
.ccScrollBar::-webkit-scrollbar {
height: 18px;
width: 18px;
}
.ccScrollBar::-webkit-scrollbar-button {
background-color: #fff;
background-repeat: no-repeat;
cursor: pointer;
}