Skip to content

Instantly share code, notes, and snippets.

View pokon548's full-sized avatar
🎯
Focusing (Busy, may slow in response)

Bu Kun pokon548

🎯
Focusing (Busy, may slow in response)
View GitHub Profile
@pokon548
pokon548 / quickswitch.ps1
Created May 10, 2024 04:04
一键切换网络优先级
#Requires -RunAsAdministrator
Add-Type -AssemblyName System.Windows.Forms
function Read-MessageBoxDialog
{
param ([string]$Message,
[string]$WindowTitle,
[System.Windows.Forms.MessageBoxButtons]$Buttons = [System.Windows.Forms.MessageBoxButtons]::OK,
[System.Windows.Forms.MessageBoxIcon]$Icon = [System.Windows.Forms.MessageBoxIcon]::None)
Add-Type -AssemblyName System.Windows.Forms
@pokon548
pokon548 / wemeet.nix
Created April 24, 2024 08:16
Broken wemeet (WIll report SIGABRT)
{ stdenvNoCC
, callPackage
, system
, fetchurl
, lib
, autoPatchelfHook
, dpkg
, makeDesktopItem
, rsync
, fd
@pokon548
pokon548 / flake.nix
Created March 10, 2024 14:27
Assertions not exists? flake.nix
{
description = "Description for the project";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
sops-nix.url = "github:Mic92/sops-nix";
};
outputs = inputs@{ flake-parts, ... }:
@pokon548
pokon548 / default.nix
Created October 30, 2023 09:20
fixup! magic workaround for permission issue
{ lib, stdenv, fetchurl, appimageTools, makeWrapper, electron_25, autoPatchelfHook, coreutils, jq }:
stdenv.mkDerivation rec {
pname = "siyuan-note";
version = "2.10.12";
src = fetchurl {
url = "https://github.com/siyuan-note/siyuan/releases/download/v${version}/siyuan-${version}-linux.AppImage";
hash = "sha256-G5lofIIkmm0DJLGc6MqBuwckCkdPA8FLs0qFH9bEYeU=";
};
{ lib, stdenv, fetchurl, appimageTools, makeWrapper, electron_27, autoPatchelfHook }:
stdenv.mkDerivation rec {
pname = "siyuan-note";
version = "2.10.12";
src = fetchurl {
url = "https://github.com/siyuan-note/siyuan/releases/download/v${version}/siyuan-${version}-linux.AppImage";
hash = "sha256-G5lofIIkmm0DJLGc6MqBuwckCkdPA8FLs0qFH9bEYeU=";
};
@pokon548
pokon548 / magisk-env.nix
Last active January 14, 2023 01:56
Setup magisk environment & toolchain in NixOS
{
pkgs ? import <nixpkgs> {},
unstable ? import (fetchTarball https://nixos.org/channels/nixos-unstable/nixexprs.tar.xz) {},
buildFHSUserEnv ? opt: (unstable.buildFHSUserEnv opt).env,
}:
buildFHSUserEnv rec {
name = "magisk-env";
targetPkgs = p: (with pkgs;