Skip to content

Instantly share code, notes, and snippets.

@ajmassi
ajmassi / LXCBindMount.md
Last active December 9, 2024 10:24
Create a bind mount from a Proxmox host on an unprivileged lxc container

Proxmox Assign Bind Mount To Unprivileged Container

In order for the LXC container to have full access the proxmox host directory, a subgid is set as owner of a host directory, and an ACL is used to ensure permissions.

Bind Mount dataset to LXC

Add the following line to /etc/pve/lxc/<CT_ID>.conf

mp0:/mount/point/on/host,mp=/mount/point/on/lxc

Create group on host

In the default Proxmox configuration, unpriviliged container subgids will have the prefix "10" followed by the expected 4-digit gid.

@steinwaywhw
steinwaywhw / One Liner to Download the Latest Release from Github Repo.md
Last active December 9, 2024 10:22
One Liner to Download the Latest Release from Github Repo
  • Use curl to get the JSON response for the latest release
  • Use grep to find the line containing file URL
  • Use cut and tr to extract the URL
  • Use wget to download it
curl -s https://api.github.com/repos/jgm/pandoc/releases/latest \
| grep "browser_download_url.*deb" \
| cut -d : -f 2,3 \
| tr -d \" \
@demisang
demisang / AesCipher.java
Last active December 9, 2024 10:20
AES/CBC/PKCS5Padding encrypt/decrypt PHP and JAVA example classes
import android.support.annotation.Nullable;
import android.util.Base64;
import java.nio.ByteBuffer;
import java.security.SecureRandom;
import javax.crypto.Cipher;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;
@whitingx
whitingx / meta-tags.md
Created October 5, 2012 16:41 — forked from kevinSuttle/meta-tags.md
Complete List of HTML Meta Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta charset='UTF-8'>
<meta name='keywords' content='your, tags'>
<meta name='description' content='150 words'>
<meta name='subject' content='your website's subject'>
<meta name='copyright' content='company name'>
@bradtraversy
bradtraversy / terminal-commands.md
Last active December 9, 2024 10:16
Common Terminal Commands

Common Terminal Commands

Key Commands & Navigation

Before we look at some common commands, I just want to note a few keyboard commands that are very helpful:

  • Up Arrow: Will show your last command
  • Down Arrow: Will show your next command
  • Tab: Will auto-complete your command
  • Ctrl + L: Will clear the screen
@raysan5
raysan5 / raylib_vs_sdl.md
Last active December 9, 2024 10:16
raylib vs SDL - A libraries comparison

raylib_vs_sdl

In the last years I've been asked multiple times about the comparison between raylib and SDL libraries. Unfortunately, my experience with SDL was quite limited so I couldn't provide a good comparison. In the last two years I've learned about SDL and used it to teach at University so I feel that now I can provide a good comparison between both.

Hope it helps future users to better understand this two libraries internals and functionality.

Table of Content

@lumpenspace
lumpenspace / 0.asciigl_intro.md
Last active December 9, 2024 10:16
TTYGL - WEBGL shader to render anything as ascii art, and react component

ASCIIGL

(as seen on gnon.ai)

usage

<AsciiEffect characters=' .,⦁↬∞∂λ⍼☿⁜ℵ'cellSize={20}/>

example

@asa1984
asa1984 / Darwinが来た!.md
Last active December 9, 2024 10:15
Darwinが来た! / asa1984 Advent Calendar 2024 6日目

Darwinが来た!

ここは「asa1984 Advent Calendar 2024」6日目の記事。Windowsの群れ、Linuxの群生地、悠然と空を舞うAndroid…パーツとソフトウェアが生い茂る大草原には、様々なコンピューターが暮らしています。

そんな中、他のコンピューターたちから遠く離れた場所にポツリと1枚の銀の板が。見つけましたM1 Macbook Airです!

今回は幻のOS・macOSの不思議な生態に迫ります。

セットアップ

@Kyle-Ye
Kyle-Ye / iPhone Mirroring.md
Last active December 9, 2024 10:14
Launch iPhone Mirroring.app on macOS 15 Beta 1
@outofmbufs
outofmbufs / keyed_lru_cache.py
Created February 16, 2023 21:51
enhance python lru_cache with key capability so it will only use a subset of the arguments for cache lookup
# MIT License
#
# Copyright (c) 2023 Neil Webber
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions: