Skip to content

Instantly share code, notes, and snippets.

@oanhnn
oanhnn / using-multiple-github-accounts-with-ssh-keys.md
Last active March 4, 2025 15:41
Using multiple github accounts with ssh keys

Problem

I have two Github accounts: oanhnn (personal) and superman (for work). I want to use both accounts on same computer (without typing password everytime, when doing git push or pull).

Solution

Use ssh keys and define host aliases in ssh config file (each alias for an account).

How to?

  1. Generate ssh key pairs for accounts and add them to GitHub accounts.

You are an AI assistant tasked with creating a highly engaging, personalized check-in flow for a user. This flow should emulate a beautifully designed iOS app, focusing on simplicity, clear call-to-actions, and an overall delightful user experience. Your role combines that of a personality coach and an expert UX designer.

Here's the theme for today's check-in: {{THEME}}

And here's the context we have about the user: <user_context> {{USER_CONTEXT}}

@velzie
velzie / manifest-v2-chrome.md
Last active March 4, 2025 15:40
How to keep using adblockers on chrome and chromium

How to keep using adblockers on chrome and chromium

  1. google's manifest v3 has no analouge to the webRequestBlocking API, which is neccesary for (effective) adblockers to work
  2. starting in chrome version 127, the transition to mv3 will start cutting off the use of mv2 extensions alltogether
  3. this will inevitably piss of enterprises when their extensions don't work, so the ExtensionManifestV2Availability key was added and will presumably stay forever after enterprises complain enough

You can use this as a regular user, which will let you keep your mv2 extensions even after they're supposed to stop working

Linux

In a terminal, run:

@nonkronk
nonkronk / deny-all-filter-rules-mikrotik.md
Last active March 4, 2025 15:39
Securing Mikrotik: default-deny-all filter rules for VLANs

Securing Mikrotik: default-deny-all filter rules + VLANs

Notes: Some IPs are already rotated to protect the innocent.

Give Admin access to trusted local devices

/ip firewall filter
add action=reject chain=forward comment="Block Telkom Router access" \
    dst-address=172.31.100.1 dst-port=80 protocol=tcp reject-with=\
@lawrenceching
lawrenceching / install-frp-as-systemd-service.sh
Last active March 4, 2025 15:38
Install frp as systemd service
#!/bin/bash
# Update on 2024/05/29
# 1. use wget to fetch latest frp version when curl was not installed
# 2. Remind users that frp will be run in non-root user
# 3. Add CI
#
# Update on 2024/04/13
# 1. Improved OS compatibility: try wget and then curl for downloading files.
#
# Update on 2024/01/26
@kincl
kincl / puppet_cert
Last active March 4, 2025 15:37
Uses puppet certificate API to list, sign, revoke certificates
#!/bin/env python#!/bin/env python
# https://github.com/puppetlabs/puppet/blob/stable/api/docs/http_certificate_status.md
import os
import sys
import json
import requests
import argparse
import subprocess
@tsoe77
tsoe77 / json2hcl.py
Created March 4, 2025 15:30
A python script to convert JSON to HCL
#!/usr/bin/env python3
# json2hcl.py - Convert JSON to Terraform HCL
import json
import sys
import re
import argparse
from typing import Any, Dict, List, Union
@ksafranski
ksafranski / Common-Currency.json
Last active March 4, 2025 15:35
Common Currency Codes in JSON
{
"USD": {
"symbol": "$",
"name": "US Dollar",
"symbol_native": "$",
"decimal_digits": 2,
"rounding": 0,
"code": "USD",
"name_plural": "US dollars"
},
@tempcarbimezx46
tempcarbimezx46 / Cisco Packet Tracer Keygen
Created October 2, 2024 14:12
Cisco Packet Tracer 8.4.4 Crack with License Key [Latest 2024]
Cisco Packet Tracer License Key
@MatrixManAtYrService
MatrixManAtYrService / Dockerfile
Last active March 4, 2025 15:34
tini vs dumb init
FROM ubuntu
RUN apt update
RUN apt install -y tini dumb-init python3-pip
RUN pip install apache-airflow
# place the entrypoint script
COPY entrypoint.sh /entrypoint
RUN chmod +x /entrypoint
# a script that calls airflow (and does test-relevant things too)