Skip to content

Instantly share code, notes, and snippets.

@dehsilvadeveloper
dehsilvadeveloper / 0_prerequisites.md
Last active January 18, 2025 18:53
Installing Docker on WSL 2 with Ubuntu 22.04

Installing Docker on WSL 2 with Ubuntu 22.04

Instalando Docker em um WSL 2 com Ubuntu 22.04

Prerequisites

Before start the installation process, make sure you meet the following prerequisites:

  • A Windows 10 operating system with WSL 2 support.
  • WSL 2 enabled.
  • Ubuntu 22.04 installed on WSL 2.
@ELI7VH
ELI7VH / react-context-boilerplate.tsx
Last active January 18, 2025 18:51
React Context Boiler Plate - Typescript
import React, { createContext, useContext, useState, useEffect } from "react"
type Props = {
children: React.ReactNode
}
type Context = {
count: number
increment: () => void
}
@achinaou
achinaou / FlywayTestAspect.scala
Last active January 18, 2025 18:50
Flyway ZIO Test Aspect
import java.util.function.UnaryOperator
import javax.sql.DataSource
import org.flywaydb.core.Flyway
import org.flywaydb.core.api.configuration.FluentConfiguration
import org.flywaydb.core.api.output.MigrateResult
import zio.*
import zio.test.TestAspect
object FlywayTestAspect:
@p7cq
p7cq / Arch_Linux_Root_On_ZFS.md
Last active January 18, 2025 18:49
Install Arch Linux with Root on ZFS

Arch Linux Root on ZFS

Installation steps for running Arch Linux with root on ZFS using UEFI and systemd-boot. All steps are run as root.

Requires an Arch Linux image with ZFS built-in (see References).

In live environment

If using KVM, add a Serial number for each virtual disk and reboot the VM. The disks should now be available in /dev/disk/by-id as virtio-<Serial>.

@speric
speric / gist:6096965
Created July 28, 2013 01:20
vimtutor Lesson Summaries
Lesson 1 SUMMARY
1. The cursor is moved using either the arrow keys or the hjkl keys.
h (left) j (down) k (up) l (right)
2. To start Vim from the shell prompt type: vim FILENAME <ENTER>
3. To exit Vim type: <ESC> :q! <ENTER> to trash all changes.
OR type: <ESC> :wq <ENTER> to save the changes.
@achinaou
achinaou / PostgreSQLContainer.scala
Last active January 18, 2025 18:49
PostgreSQL Test Container ZIO Layer
import java.sql.Connection
import javax.sql.DataSource
import org.postgresql.ds.PGSimpleDataSource
import org.testcontainers.containers.PostgreSQLContainer as OriginalPostgreSQLContainer
import zio.*
class PostgreSQLContainer(dockerImageName: String)
extends OriginalPostgreSQLContainer[PostgreSQLContainer](dockerImageName)
@DrSensor
DrSensor / Advanced Markdown Tricks.md
Last active January 18, 2025 18:46
Advanced Markdown Tricks

Repository

What Will I Learn?

In general, you will learn some markdown tricks combined with standard HTML tags. In more details what you will learn:

  • Hide-show content
  • Writing codeblocks inside codeblocks
  • Combining and using italic, bold, superscript, subscript, and/or strikethrough
  • Quoting long sentence (using nested blockquotes)
@GamerKingFaiz
GamerKingFaiz / plex-cgnat-vpn-guide.md
Created January 18, 2025 07:24
Bypass CGNAT for Plex via your own Wireguard VPN on a VPS

Bypass CGNAT for Plex via your own Wireguard VPN on a VPS

Intro

I just recently switched to an ISP that uses CGNAT. I needed a way to access my Plex server remotely now that I didn't have a public IPv4 address. Thankfully for most of my other web hosted projects, I was able to use Cloudflare tunnels. But it's ambigous if Cloudflare is okay with you using Tunnels for Plex traffic.

Instead people suggested buying a VPS and hosting a VPN (like Wireguard) to route your traffic through. I couldn't find a complete guide to do this. I struggled for a couple days with trial and error until I finally found a configuration that worked. I wanted to document this for anyone else in the same situation (and future me).

Prerequisites

@ukn
ukn / 99-install-facetime-camera.sh
Last active January 18, 2025 18:45 — forked from Stono/99-install-facetime-camera.sh
Install the kernal module required for the facetimehd camera to work on Linux
#!/bin/bash
set -e
export CONFIG_MODULE_SIG=n
export CONFIG_MODULE_SIG_ALL=n
# For current kernel
export KERNELRELEASE=$(cat /proc/version | awk '{print $3}')
temp_dir=$(mktemp -d)
echo "Installing FacetimeHD camera for $KERNELRELEASE"
@pietersp
pietersp / hybrid_gpu_archcraft_laptop_setup.md
Last active January 18, 2025 18:45
Archcraft linux setup on Intel/Nvidia hybrid laptop

Setting up my Hybrid graphics Laptop with Archcraft Linux

Setting up hybrid graphics linux is generally painful with the current state of Nvidia support. If you can avoid getting an Nvidia GPU based laptop if you plan to use Linux. I use a distro called Archcraft and had some issues specific to my setup (distro/hardware)

The hardware I am installing this on is a TongFang GM6TG7W (aka Wootbook Extreme IV). It has an Intel iGPU and an Nvidia 3070 Max-Q dGPU.