Skip to content

Instantly share code, notes, and snippets.

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

Sam Lin maxisam

💭
I may be slow to respond.
View GitHub Profile
@joulgs
joulgs / terminal.txt
Last active July 23, 2024 19:04
How install libssl1.1 on ubuntu 22.04
wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4_amd64.deb
sudo dpkg -i libssl1.1_1.1.0g-2ubuntu4_amd64.deb
@bauergeorg
bauergeorg / export_workflow_runs_to_md.py
Last active July 9, 2022 04:41
Print a Markdown-Page for more details of your workflow_dispatched Workflow Runs
from github import Github
import tomark
import datetime
from dateutil import tz
class pipeline_mngt_adv():
''' Class for pipeline management '''
def __init__(self, token, org):
''' Init function
# Start SSH Service.
wsl sudo service ssh start
# WSL2 network port forwarding script v1
# for enable script, 'Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope CurrentUser' in Powershell,
# for delete exist rules and ports use 'delete' as parameter, for show ports use 'list' as parameter.
# written by Daehyuk Ahn, Aug-1-2020
# Display all portproxy information
If ($Args[0] -eq "list") {
@kgajera
kgajera / server.ts
Created May 25, 2020 22:44
Angular Express Server with Redis Caching
import 'zone.js/dist/zone-node';
import { APP_BASE_HREF } from '@angular/common';
import { ngExpressEngine } from '@nguniversal/express-engine';
import * as express from 'express';
import { existsSync } from 'fs';
import { join } from 'path';
import * as redis from 'redis';
import { AppServerModule } from './src/main.server';
import { ComponentFactoryResolver, ComponentRef, Directive, EventEmitter, Input, Type, ViewContainerRef } from '@angular/core';
import { Subscription } from 'rxjs';
@Directive({
selector: '[lazyComp]'
})
export class LazyCompDirective {
private _inputs;
private _outputs;
private subscription = new Subscription();
@epcim
epcim / kubernetes_pods_docker_disk_usage.md
Last active June 4, 2024 05:31
docker disk space introspection kubernetes docker overlay

identify big pods/containers

investigage big files

DST=/mnt
find /var/lib -type f -size +1G -exec ls -lh {} \; | tee  $DST/bigfiles_var_lib_$(date "+%H%M").log
find /var/lib -type f -size +1G -exec ls -lh {} \; | awk '{ print $5 ": " $9 }' | sort -rh > $DST/bigfiles_var_lib_$(date "+%H%M").sorted.log

misbehave processes

@Daniel-ltw
Daniel-ltw / from.yaml
Last active August 25, 2023 21:11
Github Actions repository_dispatch example
name: Build Artifacts
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
@bchiang7
bchiang7 / github_signing_commits_with_gpg.md
Last active December 15, 2022 07:45
Signing GitHub Commits with GPG
@panicoenlaxbox
panicoenlaxbox / GenericHostWithEf.csproj
Last active August 4, 2023 04:52
.NET Core Generic host with EF Core
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.2</TargetFramework>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="2.2.6" />
@Zerpet
Zerpet / deployment.yaml
Last active March 8, 2024 09:55
RabbitMQ Perf Test deployment in Kubernetes
apiVersion: apps/v1
kind: Deployment
metadata:
name: perf-test-deployment
labels:
app: perf-test
spec:
replicas: 1
selector:
matchLabels: