国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。
Dockerized 实践 https://github.com/y0ngb1n/dockerized
| require "json" | |
| require "fileutils" | |
| require "cgi" | |
| include FileUtils::Verbose | |
| folder = 'C:\Users\hyrious\OneDrive\Apps\Violentmonkey' # <-- change to your backup folder place | |
| index_file = 'Violentmonkey' | |
| target = File.join __dir__, 'ViolentmonkeyExport' | |
| mkdir_p target |
国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。
Dockerized 实践 https://github.com/y0ngb1n/dockerized
| { inputs, ... }: | |
| { | |
| environment.systemPackages = [ | |
| (inputs.opencode.packages.${pkgs.stdenv.hostPlatform.system}.default.overrideAttrs (old: { | |
| postPatch = | |
| (old.postPatch or "") | |
| + '' | |
| substituteInPlace packages/opencode/src/session/prompt.ts \ | |
| --replace 'tools[item.id]' 'tools[`oc_''${item.id}`]' \ | |
| --replace 'id: item.id' 'id: `oc_''${item.id}`' |
| /* | |
| * Copyright 2026 Kyriakos Georgiopoulos | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
| // Example of how to use boost::asio::async_result | |
| #include <iostream> | |
| #include <boost/asio.hpp> | |
| #if BOOST_VERSION >= 106600 | |
| template<typename CompletionToken> | |
| typename boost::asio::async_result | |
| <CompletionToken, void(boost::system::error_code, std::string)>::return_type |
| import time | |
| import numpy as np | |
| import torch | |
| def ridge_fit_closed_form(X: np.ndarray, y: np.ndarray, lam: float = 1e-3) -> np.ndarray: | |
| d = X.shape[1] | |
| A = X.T @ X + lam * np.eye(d) | |
| b = X.T @ y | |
| return np.linalg.solve(A, b) |
| ---- about this neovim-configuration | |
| -- - features: completion, lsp, tree-sitter, formatter, automatic configuration of indendation. | |
| -- - goals: web development with typescript and tsx. | |
| -- - themes: on mac, one-light; otherwise, gruvbox. | |
| ---- external setup | |
| -- - install git and neovim. e.g., with guix as package-manager, run: | |
| -- guix install git neovim |
| /** | |
| * This script automates the process of deleting your own Instagram comments. | |
| * It deletes comments in batches to avoid hitting rate limits or breaking the page. | |
| * | |
| * WARNING: This function directly manipulates the DOM and depends on the current HTML | |
| * structure of Instagram's website to work. If Instagram implements changes to the | |
| * activity page layout, structure, or functionality, this script may break or cause | |
| * unexpected behavior. Use at your own risk and always review code before running it. | |
| * | |
| * How to use: |
| <?php | |
| // Karen Bot by @levelsio | |
| // | |
| // ask Claude Code or Cursor to adapt it to your city | |
| // mine is for Lisbon in Portuguese but it should work with any city and any language! | |
| // save it as council.php and add a Nginx route /council on your server to use it | |
| // make sure to add /council?key= and set a key below to use it privately | |
| // | |
| // more info: https://x.com/levelsio/status/2009011216132526407?s=20 |