Skip to content

Instantly share code, notes, and snippets.

View martin2844's full-sized avatar
☺️
Always Happy

Martin Chammah martin2844

☺️
Always Happy
View GitHub Profile
@martin2844
martin2844 / .tmux.conf
Created June 15, 2025 21:01
tmux dotfile
set -g mouse on
# Set vi-style key bindings
setw -g mode-keys vi
# Easily switch panes
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
@martin2844
martin2844 / tmux.md
Created July 7, 2025 08:23
TMUX Shortcuts

Sessions

Command Description
tmux, tmux new, tmux new-session, new Start a new session.
tmux new -s mysession, new -s mysession Start a new session named mysession.
tmux new-session -A -s mysession Attach to mysession if it exists, otherwise create it.
tmux attach, tmux attach-session, attach Attach to the last session.
tmux attach -t mysession, tmux attach-session -t mysession Attach to session mysession.
if (process.env.NEXT_RUNTIME === 'nodejs' && process.env.LOGGER_DISABLED !== 'true') {
import('./services/discordLogger')
}
/** @type {import('next').NextConfig} */
const nextConfig = {
serverExternalPackages: ["knex", "node-ssh", "discord.js", "zlib-sync"],
output: "standalone",
webpack: (config, options) => {
// Handle zlib-sync issue on ARM architecture
config.resolve.alias = {
...config.resolve.alias,
'zlib-sync': false
};
{
"name": "knext",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"migrate:make": "knex migrate:make",
"migrate:latest": "knex migrate:latest",
import { WebhookClient } from 'discord.js';
const DISCORD_WEBHOOK_URL = process.env.DISCORD_WEBHOOK_URL as string;
class DiscordLogger {
private webhook: WebhookClient | null = null;
constructor() {
// Only initialize webhook in Node.js environment
if (process.env.NEXT_RUNTIME === 'nodejs' && !process.env.IS_ARM) {