Skip to content

Instantly share code, notes, and snippets.

@adtac
adtac / Dockerfile
Last active April 13, 2024 22:33
#!/usr/bin/env docker run
#!/usr/bin/env -S bash -c "docker run -p 8080:8080 -it --rm \$(docker build --progress plain -f \$0 . 2>&1 | tee /dev/stderr | grep -oP 'sha256:[0-9a-f]*')"
# syntax = docker/dockerfile:1.4.0
FROM node:20
WORKDIR /root
RUN npm install sqlite3
@kconner
kconner / macOS Internals.md
Last active May 10, 2024 17:04
macOS Internals

macOS Internals

Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.

Starting Points

How to use this gist

You've got two main options:

@scrouthtv
scrouthtv / Arch-aarch-qemu
Created October 15, 2021 16:10
Creating an aarch64 VM for qemuhost, with Arch Linux guest
/*
* This document is provided to the public domain under the
* terms of the WTFPL license.
*/
This is
This is a combination of
- [How to boot Arch Linux ARM in QEMU (patched for M1)](https://gist.github.com/thalamus/561d028ff5b66310fac1224f3d023c12) - thanks to Avatar
Will Tisdale
#!/bin/bash
# API keys for ZeroSSL and Digital Ocean
# These particular keys are fake random hex
ZEROSSL_KEY='0f027ac0f3b24ddb3c4412f11fa1e746'
DO_KEY='a3e6ee004fd7c352af61f0465765030b5d162acc94c24fdbb42f7a8c81e897a3'
# Set root domain and take CN from params
DOMAIN=subdomain.example.com
CERT_NAME="$1"."$DOMAIN"
@akihikodaki
akihikodaki / README.en.md
Last active April 20, 2024 02:43
Linux Desktop on Apple Silicon in Practice

Linux Desktop on Apple Silicon in Practice

I bought M1 MacBook Air. It is the fastest computer I have, and I have been a GNOME/GNU/Linux user for long time. It is obvious conclusion that I need practical Linux desktop environment on Apple Silicon.

Fortunately, Linux already works on Apple Silicon/M1. But how practical is it?

  • Two native ports exist.
@tobydeh
tobydeh / docker-compose.yml
Last active October 23, 2022 20:51
gitea 1.10, drone 1.6 and drone-runner-docker example using docker-compose
# Instructions
# 1. Update your /etc/hosts file...
# > 127.0.0.1 gitea drone
# 2. Run gitea + gitea-db and generate the oauth application
# > docker-compose -p gitea-drone up gitea gitea-db
# - Navigate to http://gitea:3000 to finish the installation and register a user
# - Create a oauth application as described here: https://docs.drone.io/installation/providers/gitea/
# - Set the Redirect uri to http://drone:8000/login
# 3. Update the docker-compose file with the client_id and client_secret
# 4. Fire up all of the services
# Apply the metallb manifests to Kubernetes
kubectl apply -f https://raw.githubusercontent.com/google/metallb/v0.8.1/manifests/metallb.yaml
# Apply a metallb configuration to Kubernetes
cat <<EOF | kubectl apply -f -
apiVersion: v1
kind: ConfigMap
metadata:
namespace: metallb-system
name: config
@kallmanation
kallmanation / mcd.md
Last active March 10, 2024 21:30
mcd - mkdir && cd

mcd

Make and Change Directory

mkdir && cd

It's an often used pattern when setting up to first make a directory with mkdir and then immediately moving into the new directory with cd.

mkdir my_dir
cd my_dir
@mcfrojd
mcfrojd / Shield_Intents.MD
Last active May 7, 2024 01:19
Working INTENTS to use with Community Hass.io Add-ons: Android Debug Bridge for your Nvidia Shield TV

Latest Update 2021-03-06 : New image showing the new "Services" in Home Assistant and got some tips from the comments below.

Credits and thanks: Home Assistant Forum users & Github users: @ocso, @wiphye, @teachingbirds, @tboyce1, @simbesh, @JeffLIrion @ff12 @rebmemer @siaox @DiederikvandenB @Thebuz @clapbr @Finsterclown


Start apps on your android device (in the examples below, my Nvidia Shield TV) from Home Assistant

alt text

Starts Youtube App

entity_id: media_player.shield
command: >-
@kacole2
kacole2 / 1a-steps.md
Last active April 13, 2021 14:50
Kubernetes 1.14.1 Installation using kubeadm on vSphere with CentOS7

Steps to Install Kubernetes on CentOS7 with Kubeadm and vSphere

  1. On the master node: Edit the vsphere.conf file within the kubeadm-master.sh to match your environment. Copy kubeadm-master.sh to the master node:
sudo chmod u+x kubeadm-master.sh
sudo ./kubeadm-master.sh
  1. On each worker node copy kubeadm-worker.sh: