Skip to content

Instantly share code, notes, and snippets.

View frostming's full-sized avatar

Frost Ming frostming

View GitHub Profile
import asyncio
from typing import (
Any,
Awaitable,
Generator,
Generic,
Tuple,
TypeVar,
Union,
)
@nasyxx
nasyxx / README.md
Last active April 8, 2019 03:30
screenshot with custom effect from IM

Open with Automator.app and change the custom to yours.

Then, add the shortcut in the Setting -> Keyboard -> Shortcuts -> Services -> General (At the bottom).

version: '3'
services:
postgres:
image: postgres
rabbit:
image: "rabbitmq:latest"
ports:
- "5672:5672"
web:
@mwender
mwender / impbcopy.m
Last active March 9, 2025 19:38
Command line copy an image file to the clipboard in Mac OS X. See first comment for install instructions.
#import <Foundation/Foundation.h>
#import <Cocoa/Cocoa.h>
#import <unistd.h>
BOOL copy_to_clipboard(NSString *path)
{
// http://stackoverflow.com/questions/2681630/how-to-read-png-image-to-nsimage
NSImage * image;
if([path isEqualToString:@"-"])
{
// http://caiustheory.com/read-standard-input-using-objective-c