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
@maxisam
maxisam / Dockerfile
Last active May 1, 2025 17:55
Prerender
FROM zenika/alpine-chrome:124-with-node
# user chrome is created in the base image
# and has the following UID/GID: 1000:1000
USER chrome
WORKDIR "/home/node"
COPY ./package.json .
COPY ./server.js .
$origNvm = Get-Command nvm -CommandType Application -ErrorAction SilentlyContinue
if ($origNvm) { Set-Alias nvm_external $origNvm.Path }
function nvmFunc {
param(
[string]$Argument,
[string]$Version = ""
)
@maxisam
maxisam / nx+19.8.2.patch
Created November 1, 2024 20:06 — forked from Jordan-Hall/nx+19.8.2.patch
Community remote cache support
diff --git a/node_modules/nx/src/tasks-runner/cache.js b/node_modules/nx/src/tasks-runner/cache.js
index 36a7089..a1b7809 100644
--- a/node_modules/nx/src/tasks-runner/cache.js
+++ b/node_modules/nx/src/tasks-runner/cache.js
@@ -110,7 +110,8 @@ class DbCache {
}
}
else {
- return ((await this.getPowerpackS3Cache()) ??
+ return ((await this.getPowerpackCache(nxJson.communityCache)) ??
@maxisam
maxisam / README.md
Created September 29, 2022 15:40 — forked from magnetikonline/README.md
NSSM - the Non-Sucking Service Manager cheatsheet.
@maxisam
maxisam / dockerfile
Created July 15, 2022 19:59
Debezium Connector Dockerfile
ARG STRIMZI_VERSION="0.28.0"
ARG KAFKA_VERSION="3.1.0"
ARG DEBEZIUM_VERSION="1.9.5.Final"
FROM quay.io/debezium/connect:${DEBEZIUM_VERSION} as connectors
FROM quay.io/strimzi/kafka:${STRIMZI_VERSION}-kafka-${KAFKA_VERSION}
USER root:root
ARG DEBEZIUM_CONNECTOR="sqlserver"
COPY --from=connectors /kafka/connect/debezium-connector-${DEBEZIUM_CONNECTOR}/ /opt/kafka/plugins/debezium-connector-${DEBEZIUM_CONNECTOR}/
@maxisam
maxisam / ddns-start
Created May 22, 2022 03:08 — forked from ql-owo-lp/ddns-start
Asus-Merlin-DuckDNS
#!/bin/sh
# register a subdomain at https://www.duckdns.org/ to get your token
# put 'hostname|token' in the 'Host Name' field under DDNS
# e.g. myhost|abcdefgh-1234-5678-9876-f71b0ed7a7fe
DDNS_HOSTNAME_FIELD=$(nvram get ddns_hostname_x)
SUBDOMAIN=$(echo "$DDNS_HOSTNAME_FIELD" | awk -F'|' '{print $1}')
TOKEN=$(echo "$DDNS_HOSTNAME_FIELD" | awk -F'|' '{print $2}')
IPV4=$(nvram get wan0_ipaddr)
@maxisam
maxisam / from.yaml
Created February 7, 2022 17:04 — forked from Daniel-ltw/from.yaml
Github Actions repository_dispatch example
name: Build Artifacts
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
@maxisam
maxisam / export_workflow_runs_to_md.py
Last active February 3, 2022 18:28 — forked from bauergeorg/export_workflow_runs_to_md.py
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
@maxisam
maxisam / 2015-11-yadm.md
Created November 16, 2021 17:43 — forked from ben-axnick/2015-11-yadm.md
How to manage dotfiles with YADM

Background

Solutions I've tried

  • Git repo directly checked out in home directory

    • Noisy
    • Have to ignore *, everything is a --force
    • Juggling machine variations is a pain
  • Homesick / Homeshick

# 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") {