Skip to content

Instantly share code, notes, and snippets.

View alainkaiser's full-sized avatar
🍹
Working...

Alain Kaiser alainkaiser

🍹
Working...
View GitHub Profile
using namespace System.Management.Automation
using namespace System.Management.Automation.Language
if ($host.Name -eq 'ConsoleHost')
{
Import-Module PSReadLine
}
#Import-Module PSColors
#Import-Module posh-git
Import-Module -Name Terminal-Icons
@meriturva
meriturva / HangfireDashboardAuthorizationFilter.cs
Last active January 25, 2023 09:23
Hangfire Dashboard Jwt Authorization Filter
public class HangfireDashboardJwtAuthorizationFilter : IDashboardAuthorizationFilter
{
private static Logger logger = LogManager.GetCurrentClassLogger();
private static readonly string HangFireCookieName = "HangFireCookie";
private static readonly int CookieExpirationMinutes = 60;
private TokenValidationParameters tokenValidationParameters;
private string role;
public HangfireDashboardJwtAuthorizationFilter(TokenValidationParameters tokenValidationParameters, string role = null)
{
@oshalygin
oshalygin / hyper.js
Created December 26, 2017 01:43
Hyper.js config on Windows
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// Choose either "stable" for receiving highly polished,
// or "canary" for less polished but more frequent updates
updateChannel: 'stable',
@pimatco
pimatco / all-angular-material-components-imports.txt
Last active December 6, 2023 15:24
All Angular Material Components Imports from app.module.ts
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
//Angular Material Components
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
import {MatCheckboxModule} from '@angular/material';
import {MatButtonModule} from '@angular/material';
@newswim
newswim / antd_sc_example.js
Created August 4, 2017 22:42
Wrapping Ant Design components with Styled Components
import { Link } from 'react-router-dom'
import { Badge, Col, Menu } from 'antd'
const StyledBadge = styled(Badge)`
.ant-badge-count {
background-color: #7ECBBF;
color: white;
box-shadow: 0 0 0 1px #d9d9d9 inset;
}
`
@arniebradfo
arniebradfo / any.component.html
Last active May 16, 2023 18:05
Angular *ngFor recursive list tree template
<h1>Angular 2 Recursive List</h1>
<ul>
<ng-template #recursiveList let-list>
<li *ngFor="let item of list">
{{item.title}}
<ul *ngIf="item.children.length > 0">
<ng-container *ngTemplateOutlet="recursiveList; context:{ $implicit: item.children }"></ng-container>
</ul>
</li>
</ng-template>
@mike-casas
mike-casas / install-nvm-zsh.txt
Last active March 14, 2024 20:40
install nvm on mac with zsh shell
After install zsh
- brew update
- brew install nvm
- mkdir ~/.nvm
after in your ~/.zshrc or in .bash_profile if your use bash shell:
export NVM_DIR=~/.nvm
source $(brew --prefix nvm)/nvm.sh
@iamskok
iamskok / git-message-prefixes.md
Last active March 17, 2024 18:12
List of git commit message prefixes

Git commit message prefixes

  • [RFR] - Code refectoring
  • [WIP] - Work in progress
  • [FIX] - Bug fix
  • [FTR] - New feature
  • [SCR] - Security issue fix
  • [CLP] - Changes that do not alter functionality, but improve code style and readability.
  • [CRO] - Content Rate Optimization
  • [TST] - Add test suite for slider component