Skip to content

Instantly share code, notes, and snippets.

View ynyyn's full-sized avatar
☹️
Idling away time... - I may be slow to respond.

一年又一年 ynyyn

☹️
Idling away time... - I may be slow to respond.
  • *A fictional profile for cyberspace.
  • 地球 · 中国 / China, Earth
  • 20:10 (UTC +08:00)
View GitHub Profile
@y0ngb1n
y0ngb1n / docker-registry-mirrors.md
Last active June 30, 2024 11:41
国内的 Docker Hub 镜像加速器,由国内教育机构与各大云服务商提供的镜像加速服务 | Dockerized 实践 https://github.com/y0ngb1n/dockerized
@fy0
fy0 / mb_simple_demo.cpp
Last active May 5, 2018 11:08
包含创建窗口,JS/CPP互调,最大化/最小化,无边框窗口拖动,获取窗口句柄,根据exe文件图标设置窗口图标、只允许单实例等等
/**
Copyright (c) 2018 fy
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
@kekru
kekru / Docker connect to remote server.md
Last active June 14, 2024 09:00
Connect to another host with your docker client, without modifying your local Docker installation

Run commands on remote Docker host

This is how to connect to another host with your docker client, without modifying your local Docker installation or when you don't have a local Docker installation.

Enable Docker Remote API

First be sure to enable the Docker Remote API on the remote host.

This can easily be done with a container.
For HTTP connection use jarkt/docker-remote-api.

@bgusach
bgusach / multireplace.py
Last active April 23, 2024 18:46
Python string multireplacement
def multireplace(string, replacements, ignore_case=False):
"""
Given a string and a replacement map, it returns the replaced string.
:param str string: string to execute replacements on
:param dict replacements: replacement dictionary {value to find: value to replace}
:param bool ignore_case: whether the match should be case insensitive
:rtype: str
"""
@riverar
riverar / gist:fd6525579d6bbafc6e48
Last active December 10, 2022 08:08
C# structures to implement "Aero Glass" blur on Windows 10
[DllImport("user32.dll")]
internal static extern int SetWindowCompositionAttribute(IntPtr hwnd, ref WindowCompositionAttributeData data);
[StructLayout(LayoutKind.Sequential)]
internal struct WindowCompositionAttributeData
{
public WindowCompositionAttribute Attribute;
public IntPtr Data;
public int SizeOfData;
}