Skip to content

Instantly share code, notes, and snippets.

@lvii
lvii / xz-backdoor.md
Created March 30, 2024 15:06 — forked from thesamesam/xz-backdoor.md
xz-utils backdoor situation

FAQ on the xz-utils backdoor

Background

On March 29th, 2024, a backdoor was discovered in xz-utils, a suite of software that gives developers lossless compression. This package is commonly used for compressing release tarballs, software packages, kernel images, and initramfs images. It is very widely distributed, statistically your average Linux or macOS system will have it installed for

@lvii
lvii / flycheck-ruff.el
Created February 27, 2023 14:07 — forked from abo-abo/flycheck-ruff.el
Emacs ruff flycheck config
(require 'flycheck)
;; From https://github.com/flycheck/flycheck/issues/1974#issuecomment-1343495202
(flycheck-define-checker python-ruff
"A Python syntax and style checker using the ruff utility.
To override the path to the ruff executable, set
`flycheck-python-ruff-executable'.
See URL `http://pypi.python.org/pypi/ruff'."
:command ("ruff"
"--format=text"
@lvii
lvii / serializers.py
Created February 2, 2023 03:50 — forked from gengue/serializers.py
Django Rest Framework user endpoint with change password
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from rest_framework import serializers
from .models import User
class UserSerializer(serializers.ModelSerializer):
"""
User accounts serializer
@lvii
lvii / weread.user.js
Created October 6, 2022 02:23 — forked from jianyun8023/weread.user.js
weread download,直接生成epub。仅用于技术研究。
// ==UserScript==
// @name 微信读书下载
// @namespace http://tampermonkey.net/
// @version 0.4
// @description 下载微信读书的书籍资源
// @author tang
// @match https://weread.qq.com/web/reader/*
// @grant unsafeWindow
// @grant GM_setValue
// @grant GM_getValue
@lvii
lvii / README.md
Created September 6, 2022 07:32 — forked from agrif/README.md
my current ipxe setup

All of this should go into a directory that is available via HTTP and NFS. In variables.ipxe you can provide the HTTP root and NFS root paths, which are used later. Also there are some variables to set the default iscsi root (without the last part after the colon) and the initiator iqn. These are used to auto-fill the iscsi menu options.

You should tell iPXE to boot bootstrap.ipxe.

The bootstrap process reads a bunch of files and sets a bunch of variables. Of importance, it will read the file macs/XXXXXXX.ipxe

@lvii
lvii / install
Created June 20, 2019 08:02
install openwrt router in china
#!/bin/sh
# you may want upgrade netifd first
# override shadowsocks server config
METHOD=xchacha20-ietf-poly1305
HOST=
PORT=
KEY=
#!/bin/sh
#依赖 dnsmasq-full iptables-mod-geoip geoip的数据文件 dns-forwarder
COUNTRY=japan #国家名,字符串,用于显示和注释
COUNTRY_CODE=JP #国家代码 geoip 用
DNS=8.8.4.4 #这个国家的域名走的dns,跟普通ss走的的区分开就行
INTERNAL_DNS_PORT=5301 #本功能内部使用的端口,没被占用就可以
INTERNAL_SS_PORT=1235