Skip to content

Instantly share code, notes, and snippets.

View kedare's full-sized avatar

Mathieu Poussin kedare

View GitHub Profile
mode: daemonset
presets:
kubernetesAttributes:
enabled: true
clusterRole:
name: otlp-cluster-role
clusterRoleBinding:
@kedare
kedare / Program.cs
Last active August 6, 2023 11:56
Keycloak OpenID/OIDC with ASP.NET Identity
// Based on the configuration generated from the angular SPA template in `dotnet new`
using Microsoft.AspNetCore.Authentication;
using Microsoft.EntityFrameworkCore;
using ksite.Data;
using ksite.Models;
var builder = WebApplication.CreateBuilder(args);
// Add services to the container.
*.pyc
*.pyo
__pycache__/
tmp/
preview/
@kedare
kedare / rules.sql
Created December 9, 2022 16:42
PostgreSQL Rules demo
-- tables
CREATE TABLE public.users
(
id serial PRIMARY KEY,
username text NOT NULL,
password text NOT NULL,
is_admin boolean DEFAULT FALSE NOT NULL,
modified_date timestamp WITH TIME ZONE,
created_date timestamp WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP NOT NULL
);
{'up-ptn-table': [{'base': '0x00000000',
'name': 'bootloader',
'size': '0x0017F000'},
{'base': '0x0017F000',
'name': 'kernel',
'size': '0x001A6993'},
{'base': '0x00325993',
'name': 'rootfs',
'size': '0x01000000'},
{'base': '0x01325993',
@kedare
kedare / goroutines.go
Last active April 27, 2022 15:03
goroutines.go
func workerLZO(filePaths <-chan string, result chan<- error, wg sync.WaitGroup) {
for filePath := range filePaths {
err := DecompressLZO(filePath)
if err != nil {
log.WithFields(log.Fields{"file": filePath}).Error("LZO decompress failure")
}
result <- err
wg.Done()
}
}
@kedare
kedare / hugo-azure.yaml
Last active March 29, 2022 16:25
Concource CI
resources:
- name: kedare-blog
type: git
icon: github
source:
uri: https://github.com/kedare/kedare-blog
branch: master
- name: hugo
type: registry-image
---
version: 1.0
input:
- network
tasks:
get_hosts:
action: networking_utils.hosts
CONFIG_CCACHE=y
CONFIG_UPDATE_IMAGE=y
CONFIG_VENDOR_LENOVO=y
CONFIG_CBFS_SIZE=0x710000
CONFIG_CONSOLE_POST=y
# CONFIG_POST_DEVICE is not set
CONFIG_LINEAR_FRAMEBUFFER_MAX_WIDTH=2560
CONFIG_LINEAR_FRAMEBUFFER_MAX_HEIGHT=1600
CONFIG_CONSOLE_CBMEM_BUFFER_SIZE=0x20000
CONFIG_PCIEXP_HOTPLUG_BUSES=8
#
# Automatically generated file; DO NOT EDIT.
# coreboot configuration
#
#
# General setup
#
CONFIG_COREBOOT_BUILD=y
CONFIG_LOCALVERSION=""