Skip to content

Instantly share code, notes, and snippets.

@vec715
vec715 / .md
Last active April 24, 2024 15:22
Setup Podman on Chrome OS Flex and Crostini

Actual versions for this guide:

  • Operating System: Debian GNU/Linux 12 (bookworm)
  • Kernel: Linux 6.1.64-09049-g010fe86d9eae
  • Architecture: x86-64
  • Podman: v1.7.1

Installation

1. Install Podman:

sudo apt install podman
@barakplasma
barakplasma / script.js
Last active March 20, 2024 18:30
Display if KSP items in category are available nearby (on context menu right click)
// ==UserScript==
// @name Show in stock on KSP
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://ksp.co.il/web/cat/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=co.il
// @grant GM.xmlHttpRequest
// @connect ksp.co.il
# STEP 1: Load
# Load documents using LangChain's DocumentLoaders
# This is from https://langchain.readthedocs.io/en/latest/modules/document_loaders/examples/csv.html
from langchain.document_loaders.csv_loader import CSVLoader
loader = CSVLoader(file_path='./example_data/mlb_teams_2012.csv')
data = loader.load()
@stokito
stokito / webdav_curl.md
Last active April 16, 2024 13:51
WebDAV with curl for scripts and command line

Assuming the following:

  • Webdav share URL: http://example.com/dav/
  • Username: user
  • Password: pass

curl options:

  • -u username:password use HTTP Basic authorization with the folowing username and password
  • -X GET send a request with GET method. You can use any other methods here.
@Gaelan
Gaelan / README.md
Last active August 29, 2023 04:13
ChatGPT passes the 2022 APCSA free response section

ChatGPT passes the 2022 AP Computer Science A free response section

For fun, I had ChatGPT take the free response section of the 2022 AP Computer Science A exam. (The exam also has a multiple-choice section, but the College Board doesn't publish this.) It scored 32/36.

Methodology

  • For each question, I pasted in the full text of the question and took the response given.
  • I tried each question once and took the response given: no cherry-picking. For readability, I've added indentation in some cases, and included method signatures where they were provided in the question and ChatGPT only provided a body. I've added question numbers; any other comments are ChatGPT's.
  • Many questions have examples containing tables or diagrams; because those don't translate well to plain text, I excluded those tables/diagrams and any text that referenced them.
  • I excluded the initial instructions at the top of th
@tdamsma
tdamsma / migrating-away-from-docker-desktop.md
Last active April 30, 2024 10:17
Running VSCode remote containers on windows without docker desktop

Running VSCode remote containers on windows without docker desktop

Due to the license issues with docker desktop and the fact that you don't really need this buggy bit of software, this guide will walk you through the steps to use VSCode+remote-containers in combination with WSL2 without using docker desktop.

Get rid of docker desktop

Only if you have docker desktop currently installed of course

Uninstall docker desktop application

@sindresorhus
sindresorhus / esm-package.md
Last active May 8, 2024 22:50
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.
@usametov
usametov / topics-search.txt
Created February 16, 2021 01:50
how to search github.com for multiple topics
Github.com ui .currently does not natively supoport search for multiple topic tags as of now. However their api allows you to query multiple tags. Below is a simple example to query github.com with ecs and go topic tags.
curl -H "Accept: application/vnd.github.mercy-preview+json" \
https://api.github.com/search/repositories?q=topic:ecs+topic:go
Response from the github can be rather verbose so lets filter only relavant info such repo url and description.
curl -H "Accept: application/vnd.github.mercy-preview+json" \
https://api.github.com/search/repositories\?q\=topic:ecs+topic:go | jq '.items[] | {url:.url, description:.description}'
@eldadfux
eldadfux / .env
Last active June 29, 2022 05:24
Appwrite 0.14 - Stack
_APP_ENV=production
_APP_LOCALE=en
_APP_OPTIONS_ABUSE=enabled
_APP_OPTIONS_FORCE_HTTPS=disabled
_APP_OPENSSL_KEY_V1=your-secret-key
_APP_DOMAIN=localhost
_APP_DOMAIN_TARGET=localhost
_APP_CONSOLE_WHITELIST_ROOT=enabled
_APP_CONSOLE_WHITELIST_EMAILS=
_APP_CONSOLE_WHITELIST_IPS=
@FreddieOliveira
FreddieOliveira / docker.md
Last active May 8, 2024 18:12
This tutorial shows how to run docker natively on Android, without VMs and chroot.

Docker on Android 🐋📱

Edit 🎉

All packages, except for Tini have been added to termux-root. To install them, simply pkg install root-repo && pkg install docker. This will install the whole docker suite, left only Tini to be compiled manually.


Summary