Skip to content

Instantly share code, notes, and snippets.

View milad1367's full-sized avatar
💭
I may be slow to respond.

Milad Asghari Amlashi milad1367

💭
I may be slow to respond.
View GitHub Profile
import VueRouter from 'vue-router';
import { getUser } from './auth'; // Replace with your authentication utility
// Step 1: Define Routes with Role Metadata
const routes = [
{
path: '/dashboard',
component: Dashboard,
meta: { requiresAuth: true, roles: ['admin', 'user'] } // Dashboard accessible by both admins and users
},
## openconnect ocserv
# Clone
clone the repository from [github](https://github.com/wppurking/ocserv-docker)
```
cd ~;
git clone https://github.com/wppurking/ocserv-docker.git;
docker run -d --privileged --name ocserv-docker -v ~/ocserv-docker/ocserv:/etc/ocserv -p 443:443 wppurking/ocserv
```
now you can connect to ocserv at your server's ip at port 443 like $ipaddress:443
# diffrent port
@milad1367
milad1367 / ngoninit
Last active November 29, 2016 06:33
ngoninit
import { Component } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { Router } from '@angular/router';
import {InfoComponent} from './info.component'
export class Hero {
name:string;
email:string;
}
import { Component } from '@angular/core';
export class Hero {
name: string,
event_name: string,
email:string
}
var Heroes:Hero[]=[{name:'',event_name:'',email:''}];
var local :Hero[];
@Component({
@milad1367
milad1367 / dabblet.css
Created November 4, 2015 18:35
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
body {
font-family: Arial;
font-size: 33px;
}
a {