Skip to content

Instantly share code, notes, and snippets.

View Neos21's full-sized avatar
:octocat:
https://neos21.net/

Neos21 Neos21

:octocat:
https://neos21.net/
View GitHub Profile
@0xngmi
0xngmi / potential-bad-domains.txt
Last active August 27, 2024 05:12
List of domains associated with squarespace at risk of being hacked
List of domains that are registered with squarespace and thus could be vulnerable:
celer.network
pendle.finance
karak.network
compound.finance
hyperliquid.xyz
dydx.exchange
thorchain.com
threshold.network
@OrchidLuna
OrchidLuna / install-mastodon.md
Last active February 25, 2025 13:50
How to install Mastodon in docker (even easier imo, 2024)

I'm assuming you're running the latest version of Ubuntu (24.04) or Debian (12), so the installation of prerequisites will use apt.

  1. Login as root: sudo -i
  2. Install the prerequisites: apt install docker.io docker-compose nginx python3-venv
  3. Create directory for Mastodon: mkdir /opt/mastodon
  4. Enter to Mastodon directory: cd /opt/mastodon
  5. Create directory for Postgres: mkdir postgres14
  6. Create directory for Redis: mkdir redis
  7. Create directory for Mastodon files: mkdir -p public/system
  8. Set owner to Mastodon user (991) for public directory: chown -R 991:991 public
  9. Get docker-compose.yml for Mastodon: wget https://raw.githubusercontent.com/mastodon/mastodon/main/docker-compose.yml
Running 'yarn install' with yarn.lock
➤ YN0000: · Yarn 4.2.2
➤ YN0000: ┌ Resolution step
➤ YN0085: │ + typescript@patch:typescript@npm%3A5.5.2#optional!builtin<compat/typescript>::version=5.5.2&hash=b45daf
➤ YN0085: │ - typescript@patch:typescript@npm%3A5.5.2#optional!builtin<compat/typescript>::version=5.5.2&hash=379a07
➤ YN0000: └ Completed in 0s 446ms
➤ YN0000: ┌ Post-resolution validation
➤ YN0002: │ @mastodon/mastodon@workspace:. doesn't provide redux (p7a946), requested by react-redux-loading-bar.
➤ YN0086: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code.
➤ YN0000: │
@katagaki
katagaki / FlaskOpenAIStreamingAPI.py
Last active March 1, 2025 13:25
Simple Flask server that streams Azure OpenAI responses to its root endpoint.
# requirements.txt:
#
# flask
# flask_restx
# openai
# python-dotenv
#
# .env:
# AZURE_OPENAI_ENDPOINT=
# AZURE_OPENAI_API_KEY=
@kyo-takano
kyo-takano / making-the-most-of-local-llms.ipynb
Last active March 14, 2025 00:43
ローカルLLMはこーやって使うの💢
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@thesamesam
thesamesam / xz-backdoor.md
Last active March 12, 2025 15:55
xz-utils backdoor situation (CVE-2024-3094)

FAQ on the xz-utils backdoor (CVE-2024-3094)

This is a living document. Everything in this document is made in good faith of being accurate, but like I just said; we don't yet know everything about what's going on.

Update: I've disabled comments as of 2025-01-26 to avoid everyone having notifications for something a year on if someone wants to suggest a correction. Folks are free to email to suggest corrections still, of course.

Background

// Build URL safely in TypeScript (Deno)
//
// See:
// https://developer.mozilla.org/ja/docs/Web/API/URL
// https://developer.mozilla.org/ja/docs/Web/API/URLSearchParams
import { assertEquals } from "https://deno.land/std/testing/asserts.ts";
export function buildURL(
base: string,
@voodoohop
voodoohop / chatgpt_commit_messages.sh
Last active December 10, 2024 14:52
One-Liner Using ChatGPT for Concise, Automated Git Commit Messages
# install
pip install shell-gpt
sgpt "hi" (and enter your API key)
# commit the current folder with the generated message
git commit . -m "$(git diff | sgpt --model gpt-4o --code 'Write concise, informative commit messages: Start with a summary in imperative mood, explain the 'why' behind changes, keep the summary under 50 characters, use bullet points for multiple changes, avoid using the word refactor, instead explain what was done, and reference related issues or tickets. What you write will be passed to git commit -m "[message]"')"
# you could assign an alias now if you like it
@miio
miio / FixDS-Lite.bash
Last active January 21, 2025 14:03
UDM Pro で固定IPv4を使いたい場合やDS-Liteが挙動おかしいときに作ったスクリプト
# DS-Lite修正
# 参考
# https://techlog.iij.ad.jp/contents/dslite-raspi
REMOTE=''
# SLAAC シングルの人は多分これでいける
# LOCAL=`ip addr show br0 | grep 'mngtmpaddr' | awk '{print $2}' | awk -F/ '{print $1}'`
# DHCP-PDv6の人はこっち
LOCAL=`ip addr show br0 | grep 'inet6' | grep 'dynamic' | awk '{print $2}' | awk -F/ '{print $1}'`
@zicklag
zicklag / configureGlobalFetch.ts
Created January 13, 2024 19:35
Configuring a Global Proxy for Undici That Kind of Supports the `no_proxy` Environment Variable.
/**
* Importing this modules will configure the global undici agent, which is used to provide
* global `fetch()` support, to use an http proxy if present during development. Unfortunately
* undici doesn't come with this functionality so we implement a solution that is not fully
* correct as to the way that proxy environment variables are supposed to be parsed.
*
* This only goes into effect during development, though, and it's functional enough for that
* purpose.
*/