Useful for accessing a computer that does not have a public IP address, over the internet. The machine can be behind multiple firewalls and NATs.
Discover gists
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<root xmlns="urn:schemas-upnp-org:device-1-0"> | |
<specVersion> | |
<major>1</major> | |
<minor>0</minor> | |
</specVersion> | |
<device> | |
<deviceType>urn:schemas-upnp-org:device:MediaRenderer:1</deviceType> | |
<friendlyName>MS6586_EU(192.168.0.186)</friendlyName> | |
<manufacturer>TCL</manufacturer> | |
<manufacturerURL>http://www.tcl.com</manufacturerURL> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -eou pipefail | |
jira issue list \ | |
-a$(jira me) \ | |
--plain \ | |
--columns id,summary,status | | |
fzf \ | |
--layout=reverse \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required(VERSION 3.25) | |
project(example VERSION 0.1.0) | |
add_executable(example main.cpp) | |
add_executable(example::example ALIAS example) | |
include(GNUInstallDirs) | |
include(CMakePackageConfigHelpers) | |
set(EXAMPLE_INSTALL_CMAKEDIR "${CMAKE_INSTALL_DATADIR}/cmake/Example" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { neonConfig, Pool } from '@neondatabase/serverless' | |
import { PrismaNeon } from '@prisma/adapter-neon' | |
import { PrismaClient } from '@prisma/client' | |
import { WebSocket } from 'ws' | |
// Example Supabase pooled connection string (must use Supavisor) | |
const connectionString = | |
'postgres://[username].[id]:[password]@aws-0-us-east-1.pooler.supabase.com:5432/[db]' | |
const url = new URL(connectionString) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Disable auto-negotiation for %i | |
Requires=sys-subsystem-net-devices-%i.device | |
After=sys-subsystem-net-devices-%i.device | |
[Service] | |
ExecStart=/usr/bin/ethtool -s %i duplex full speed 100 autoneg off | |
Type=oneshot | |
[Install] |
Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.
- Follow standard conventions.
- Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
- Boy scout rule. Leave the campground cleaner than you found it.
- Always find root cause. Always look for the root cause of a problem.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { addYears } from 'date-fns' | |
import { NextRequest, NextResponse } from 'next/server' | |
function middleware(req: NextRequest) { | |
if (req.nextUrl.pathname.startsWith('/api')) { | |
return NextResponse.next() | |
} | |
if (process.env.VERCEL_ENV !== 'preview') { | |
return NextResponse.next() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local RemoveComments = function() | |
local ts = vim.treesitter | |
local bufnr = vim.api.nvim_get_current_buf() | |
local ft = vim.bo[bufnr].filetype | |
local lang = ts.language.get_lang(ft) or ft | |
local ok, parser = pcall(ts.get_parser, bufnr, lang) | |
if not ok then return vim.notify("No parser for " .. ft, vim.log.levels.WARN) end | |
local tree = parser:parse()[1] |
Required hw:
NewerOlder