This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Component({ | |
selector: 'hangfire-container', | |
templateUrl: './hangfire-container.component.html' | |
}) | |
export class HangfireContainerComponent implements OnDestroy { | |
constructor(securityService: AbstractSecurityService) { | |
// Set cookie HangFireCookie | |
document.cookie = `HangFireCookie=${securityService.getCurrentToken()};Path=/`; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<iframe src="/hangfire" class="w-100 h-100" frameborder="0"></iframe> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var hangFireDashboardOptions = new DashboardOptions { | |
DashboardTitle = "Scheduler", | |
// To remove back link | |
AppPath = null, | |
Authorization = new IDashboardAuthorizationFilter[] | |
{ | |
new HangfireDashboardJwtAuthorizationFilter("Admin") | |
} | |
}; | |
app.UseHangfireDashboard("/hangfire", hangFireDashboardOptions); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { workspaces, } from '@angular-devkit/core'; | |
import { NodeJsSyncHost } from '@angular-devkit/core/node'; | |
import { ProjectType } from '@schematics/angular/utility/workspace-models'; | |
(async () => { | |
const { workspace } = await workspaces.readWorkspace( | |
process.cwd(), | |
workspaces.createWorkspaceHost(new NodeJsSyncHost()), | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as path from 'path'; | |
import { from } from 'rxjs'; | |
import { filter, tap } from 'rxjs/operators'; | |
const angularFile = require(path.join(__dirname, 'angular.json')); | |
console.log('Start: do something only on my libraries'); | |
from(Object.keys(angularFile.projects)).pipe( | |
filter(key => angularFile.projects[key].projectType === 'library'), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<!-- XSD manual extracted from package NLog.Schema: https://www.nuget.org/packages/NLog.Schema--> | |
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xsi:schemaLocation="NLog NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" autoReload="true"> | |
<extensions> | |
<add assembly="Sentry.NLog" /> | |
</extensions> | |
<targets> | |
<target xsi:type="File" name="file" layout="${date}|${level:uppercase=true}|${message} ${exception:format=tostring}|${logger}|${all-event-properties}" fileName="${basedir}/logs/logfile.txt" archiveFileName="${basedir}/logs/logfile.{#}.txt" archiveEvery="Day" maxArchiveFiles="7" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var express = require('express'); | |
var app = express(); | |
// Solo un semplice metodo di test | |
app.get('/', (req, res) => { | |
res.send('Hello World!'); | |
}); | |
// Qui faccio la send dentro alla then | |
app.get('/test1', (req, res) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected virtual Type[] GetKeysTypes() | |
{ | |
var model = Context.Set<TEntity>().GetService<IDbContextServices>().Model; | |
var entityType = model.FindEntityType(typeof(TEntity).ToString()); | |
return entityType.FindPrimaryKey() | |
.Properties | |
.Select(p => p.ClrType) | |
.ToArray(); | |
} |
NewerOlder