Skip to content

Instantly share code, notes, and snippets.

@mikepianka
mikepianka / README.txt
Last active January 16, 2025 09:09
Python http.server exe
This is Python's http.server that has been bundled to an .exe using PyInstaller. You can use it as a local web server for testing.
Run the local server
1. Copy the server.exe into the folder you want to serve and then double click it to start the local server.
2. A window will pop up letting you know the server is running on port 8000.
3. Open http://localhost:8000/ in your web browser.
4. When you are done, simply close the server.exe window to stop the local server.
If you have another service running on port 8000, you can run on a different port like so:
1. Open Command Prompt
@mmozeiko
mmozeiko / build.bat
Last active January 16, 2025 09:09
build.bat with caching (for VS2019)
@echo off
setlocal EnableDelayedExpansion
set BUILD_CACHE=%~dp0\_build_cache.cmd
if exist "!BUILD_CACHE!" (
rem cache file exists, so call it to set env variables very fast
call "!BUILD_CACHE!"
) else (
if not exist "%VS2019INSTALLDIR%\VC\Auxiliary\Build\vcvarsall.bat" (
@liuran001
liuran001 / config.yaml
Last active January 16, 2025 09:08
mihomo (Clash Meta) 懒人配置
# mihomo (Clash Meta) 懒人配置
# 版本 V1.15-241205
# https://gist.github.com/liuran001/5ca84f7def53c70b554d3f765ff86a33
# https://obdo.cc/meta
# 作者: 笨蛋ovo (bdovo.cc)
# Telegram: https://t.me/baka_not_baka
# 关注我的 Telegram 频道谢谢喵 https://t.me/s/BDovo_Channel
# 修改自官方示例规则 https://wiki.metacubex.one/example/#meta
# 转载请保留此注释
# 尽量添加了较为详尽的注释,不理解的地方建议对照 虚空终端 (Clash Meta) Docs 进行理解
@tlux
tlux / context.ts
Created March 15, 2023 12:59
Simple TypeScript wrapper to set and get Svelte contexts
import { getContext, setContext } from "svelte";
/**
* The context object.
*/
export interface Context<T> {
get: () => T;
set: (ctx: T) => T;
}
@bkaradzic
bkaradzic / orthodoxc++.md
Last active January 16, 2025 09:02
Orthodox C++

Orthodox C++

What is Orthodox C++?

Orthodox C++ (sometimes referred as C+) is minimal subset of C++ that improves C, but avoids all unnecessary things from so called Modern C++. It's exactly opposite of what Modern C++ suppose to be.

Why not Modern C++?

The citations game: Pressman Ratios

Rubric: Software Engineering : Factual Claims : Defect Cost Increase : Pressman Ratios

Context

See previous note on the IBM Systems Sciences Institute

Origins

@audrasjb
audrasjb / wp-playground-opquast-widget
Last active January 16, 2025 09:00
WordPress Playground instance for Opquast widget
{
"landingPage": "/wp-admin/",
"login": true,
"plugins": [
"https://jeanbaptisteaudras.com/plugins/who-opquast-widgets.zip"
],
"siteOptions": {
"blogname": "Le joli widget Opquast"
}
}
@pablotolentino
pablotolentino / Visual Studio 2022 Product Key
Created November 20, 2021 20:41
Visual Studio 2022 Enterprise Product key
Visual Studio 2022
Enterprise :
VHF9H-NXBBB-638P6-6JHCY-88JWH
Professional:
TD244-P4NB7-YQ6XK-Y8MMM-YWV2J
@xfournet
xfournet / config.ts
Last active January 16, 2025 08:57
airbnb compat with ESLint 9
import { fixupConfigRules } from '@eslint/compat';
import { FlatCompat } from '@eslint/eslintrc';
import stylistic from '@stylistic/eslint-plugin';
import path from 'path';
import { fileURLToPath } from 'url';
const filename = fileURLToPath(import.meta.url);
const dirname = path.dirname(filename);
const compat = new FlatCompat({
baseDirectory: dirname,