Skip to content

Instantly share code, notes, and snippets.

@Squix
Squix / tailwind_penpot_tokens.json
Last active November 16, 2025 22:12
TailwindCSS default theme design tokens for Penpot implementation. There are spacing, border-width, border-radius and sizing tokens.
{
"Global": {
"spacing-01": { "$value": "4px", "$type": "spacing", "$description": "p-1, m-1, ..." },
"spacing-02": { "$value": "8px", "$type": "spacing", "$description": "p-2, m-2, ..." },
"spacing-03": { "$value": "12px", "$type": "spacing", "$description": "p-3, m-3, ..." },
"spacing-04": { "$value": "16px", "$type": "spacing", "$description": "p-4, m-4, ..." },
"spacing-05": { "$value": "20px", "$type": "spacing", "$description": "p-5, m-5, ..." },
"spacing-06": { "$value": "24px", "$type": "spacing", "$description": "p-6, m-6, ..." },
"spacing-07": { "$value": "28px", "$type": "spacing", "$description": "p-7, m-7, ..." },
"spacing-08": { "$value": "32px", "$type": "spacing", "$description": "p-8, m-8, ..." },
@alexanderdavidsen
alexanderdavidsen / fetch-aws-spotprice.bash
Last active May 21, 2025 09:24
Bash script to fetch AWS spot pricing
#!/usr/bin/env bash
# Colors
BLUE='\033[0;34m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
RED='\033[0;31m'
NC='\033[0m' # No Color
BOLD='\033[1m'
@andreswebs
andreswebs / aws-ec2-ubuntu-desktop.md
Last active April 19, 2024 03:22
Set up a desktop environment accessible via RDP on an AWS EC2 instance running Ubuntu

add a non-root user with sudo permissions

(The username in this example is desktop.)

sudo addgroup --gid 2000 desktop
sudo adduser \
    --gid 2000 \
    --uid 2000 \
    --gecos "" \
@khalidx
khalidx / node-typescript-esm.md
Last active October 18, 2025 09:49
A Node + TypeScript + ts-node + ESM experience that works.

The experience of using Node.JS with TypeScript, ts-node, and ESM is horrible.

There are countless guides of how to integrate them, but none of them seem to work.

Here's what worked for me.

Just add the following files and run npm run dev. You'll be good to go!

package.json

@michal-kazmierczak
michal-kazmierczak / prometheus_metrics_management.json
Last active October 13, 2024 11:02
Prometheus Metrics Management
{
"__inputs": [
{
"name": "default",
"label": "default",
"description": "",
"type": "datasource",
"pluginId": "prometheus",
"pluginName": "Prometheus"
}
@invictus-ir
invictus-ir / CloudTrail.csv
Last active October 10, 2025 15:40
An overview of CloudTrail events that are interesting from an Incident Response perspective
We can make this file beautiful and searchable if this error is corrected: It looks like row 8 should actually have 10 columns, instead of 9 in line 7.
"Initial Access","Execution","Persistence","Privilege Escalation","Defense Evasion","Credential Access","Discovery","Lateral Movement","Exfiltration","Impact"
ConsoleLogin,StartInstance,CreateAccessKey,CreateGroup,StopLogging,GetSecretValue,ListUsers,AssumeRole,CreateSnapShot,PutBucketVersioning
PasswordRecoveryRequested,StartInstances,CreateUser,CreateRole,DeleteTrail,GetPasswordData,ListRoles,SwitchRole,ModifySnapshotAttributes ,RunInstances
,Invoke,CreateNetworkAclEntry,UpdateAccessKey,UpdateTrail,RequestCertificate,ListIdentities,,ModifyImageAttribute,DeleteAccountPublicAccessBlock
,SendCommand,CreateRoute,PutGroupPolicy,PutEventSelectors,UpdateAssumeRolePolicy,ListAccessKeys,,SharedSnapshotCopyInitiated,
,,CreateLoginProfile,PutRolePolicy,DeleteFlowLogs,,ListServiceQuotas,,SharedSnapshotVolumeCreated,
,,AuthorizeSecurityGroupEgress,PutUserPolicy,DeleteDetector,,ListInstanceProfiles,,ModifyDBSnapshotAttribute,
,,AuthorizeSecurityGroupIngress,AddRoleToInstanceProfile,DeleteMembers,,ListBuckets,,PutBucketP
@lithdew
lithdew / main.ts
Last active May 11, 2023 06:31
deno (udp holepunching): basic stun client for fetching public-facing ip:port
// deno run -A --unstable main.ts
export const classToValue = {
request: 0x0000,
indication: 0x0010,
success: 0x0100,
failure: 0x0110,
};
export const methodToValue = {
@kfox
kfox / README.md
Last active September 23, 2025 07:02
TCP echo server for Node.js

TCP echo server for Node.js

Usage

  1. Make sure you have a modern-ish version of Node.js installed.
  2. Type npx https://gist.github.com/kfox/1280c2f0ee8324067dba15300e0f2fd3
  3. Connect to it from a client, e.g. netcat or similar: nc localhost 9000
@turing85
turing85 / Dockerfile
Last active December 8, 2025 11:20
Multistage dockerfile to install software into an UBI micro image
ARG MICRODIR=/microdir
ARG PACKAGES_TO_INSTALL="java-17-openjdk-devel"
FROM registry.access.redhat.com/ubi8-micro@sha256:eb4245271537034f69ee336a4a2b31d3fbae4048ec1db53ff89de749c35cf537 AS BASE
FROM registry.access.redhat.com/ubi8@sha256:83c0e63f5efb64cba26be647e93bf036b8d88b774f0726936c1b956424b1abf6 AS BUILD
ARG MICRODIR
ARG PACKAGES_TO_INSTALL
RUN mkdir ${MICRODIR}
COPY --from=BASE / ${MICRODIR}