Skip to content

Instantly share code, notes, and snippets.

@b01
b01 / download-vs-code-server.sh
Last active March 19, 2024 11:47
Linux script to download latest VS Code Server, good for Docker (tested in Alpine).
#!/bin/sh
# Copyright 2023 Khalifah K. Shabazz
#
# 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:
@veekaybee
veekaybee / normcore-llm.md
Last active March 19, 2024 11:44
Normcore LLM Reads

Anti-hype LLM reading list

Goals: Add links that are reasonable and good explanations of how stuff works. No hype and no vendor content if possible. Practical first-hand accounts of models in prod eagerly sought.

Foundational Concepts

Screenshot 2023-12-18 at 10 40 27 PM

Pre-Transformer Models

@EddiG
EddiG / wireshark.md
Last active March 19, 2024 11:43
How to decrypt SSL/TLS traffic in Wireshark on MacOS

The main point is to save the SSL/TLS keys those used by the web browser (SSLKEYLOGFILE=/tmp/tmp-google/.ssl-key.log).
In the example below we run brand new instance of Google Chrome (--user-data-dir=/tmp/tmp-google do the trick):
SSLKEYLOGFILE=/tmp/tmp-google/.ssl-key.log /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --user-data-dir=/tmp/tmp-google
Then run the Wireshark and open the Preferences -> Protocols -> SSL, where we put the path to the SSL keys log file into the (Pre)-Master-Secret log filename field.
Now all SSL/TLS traffic from this browser instance will be decrypted.

@sindresorhus
sindresorhus / esm-package.md
Last active March 19, 2024 11:43
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@jinjier
jinjier / 250.csv
Last active March 19, 2024 11:43
JavDB Top 250 movies code list. [Updated at 2024/02]
1 LAFBD-41
2 SSNI-497
3 ABP-984
4 IPX-580
5 IPX-811
6 IPX-177
7 STARS-804
8 SMBD-115
9 ABP-968
10 ABF-017
@dattasaurabh82
dattasaurabh82 / CH340N_linux_fix.md
Last active March 19, 2024 11:41
Fix Driver issues for CH340N usb serial chip in Linux (Ubuntu 22.04)

Tested on Ubuntu 20, 21 earlier and they were not working. So upgraded Ubutbu to latest 22 version.

The issue is: The built in Kernals of Ubuntu and many Linux Kernals (between ) have the CH340 drivers broken / have bugs and not fixed (from kernal 5.4.0-87 and above)

Note: I didn't try on linux kernal 5.4.0-86 my self. I though I will see how is the situation in the latest linux kernal (as of 16/05/2022)

Instructions for Ubuntu 22.04 LTS x86_64

@dvdotsenko
dvdotsenko / dataclass_recursive_deserialize.py
Created November 25, 2020 04:02
Python Recursive / Nested `dataclass` instances deserialization worker. Simple.
"""
Code that creates nested `dataclass` instances tree from JSON data.
Somewhat similar to what Pydantic, Schematics do out of the box,
but native Python dataclasses don't do automatically.
See discussion here for context
https://stackoverflow.com/questions/51564841/creating-nested-dataclass-objects-in-python
See tests on the bottom of this file usage examples.
Tested on Python 3.9
@Da9el00
Da9el00 / Dockerfile_mysql
Created March 15, 2023 23:09
python and MySQL
# NOTE name need to be Dockerfile
FROM mysql:latest
COPY ./databse_students.sql /docker-entrypoint-initdb.d/
@vimal-verma
vimal-verma / Git-commands.md
Last active March 19, 2024 11:39
A list of Git commands

Git Commands

A list of Git commands

feel free to star this



@packerdl
packerdl / lxc_plex_intel_quicksync.md
Last active March 19, 2024 11:35
Intel QuickSync passthrough to an unprivileged LXC container running plex.

Running Plex in an Unprivileged LXC with Intel QuickSync Passthrough

First setup an unprivileged Ubuntu container with Plex Media Server installed. Inside the container take note of the id of the plex group.

# Your Plex group's ID may be different
$ getent group plex | cut -d : -f3
998