Skip to content

Instantly share code, notes, and snippets.

<?php
namespace App\Http\Middleware;
use Closure;
use App\user;
use App\GroupRresources;
use App\Resources;
class PermissionChecker {
<?php
/**
* CORS.php
* @author raf <[email protected]>
* @copyright Copyright (c) 2015, raf
*/
namespace App\Http\Middleware;
asset is a single asset item type
asset type is a asset classification class
asset location provides where they are located
asset items in location sets each item in the location
asset item is assigned to a user
asset item has purchase record
asset item belongs to a user from an assigned date and can be re-assigned to different user on a different date
asset item can be discarded (state change)
asset item can be returned to an asset inventory when not in use
$http({method: 'post', url:uri+'user/store'}).
success(function(data, status, headers, config) {
$location.path('admin/user/edit/'+data);
});
'use strict';
angular.module('clientApp')
.controller('staffCtrl', function ($scope,$http,uri,Helper) {
$scope.frm = {};
$scope.deparments = [];
$http.get(uri+'staff').
success(function(data, status, headers, config) {
$scope.staff = data.staff;
$scope.departments = data.departments;
@Adamwaheed
Adamwaheed / mbDatepicker
Created March 29, 2015 03:56
Date Picker Directives
app.directive('mbDatepicker', function() {
'use strict';
return {
restrict: 'AE',
replace:true,
scope :{
mbModel : '=',
mbDpConfig: '=',
label : '@',
mbId: '='
@Adamwaheed
Adamwaheed / vhost.sh
Last active June 4, 2024 21:57
Simple Apache Vhost manager
#!/bin/bash
NONE='\033[00m'
RED='\033[01;31m'
GREEN='\033[01;32m'
YELLOW='\033[01;33m'
PURPLE='\033[01;35m'
CYAN='\033[01;36m'
WHITE='\033[01;37m'
BOLD='\033[1m'
Intent intent = new Intent();
PendingIntent pendingIntent = PendingIntent.getActivity(MainActivity.this,0,intent,0);
Notification noti = new Notification.Builder(MainActivity.this)
.setTicker("Title")
.setContentTitle("Contant Tutle")
.setContentText("Hekko this is nust")
.setContentText("Content Texty")
.setSmallIcon(android.R.drawable.menu_frame)
.setContentIntent(pendingIntent).getNotification();
@Adamwaheed
Adamwaheed / Block_Block.java
Created February 20, 2016 15:04
BlockModel
package mv.com.jps.alerm.Block;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
import java.util.ArrayList;
import java.util.List;
/**
* Created by amin on 2/20/16.
app.directive('articleView', function(){
return {
template: '',
scope: {
media: '='
},
restrict: 'E',
controller: function($scope) {