GitHub iconTwitter icon

Recent

  • fx - View large json file.

alfred@4 self-use awesome workflows

能不能好好说话

拼音缩写翻译。可以在这里预览效果

https://github.com/TheColdVoid/nbnhhsh

time zone

tz

http://www.packal.org/workflow/timezones-2

caffeinate

就是那个控制亮屏时间的小工具

http://www.packal.org/workflow/caffeinate-control

case

几种字符串类型的快速切换

case

https://github.com/gillibrand/alfred-change-case

toggle airpods

快速的连接airpods(不知道新的macos支不支持快速切换)

airpods

https://github.com/jasonshanks/alfred-workflow-toggle-airpods

terminal finder

在finder中打开iterm,或者在iterm打开finder。和当前focus的finder or iterm窗口有关

tf

https://github.com/LeEnno/alfred-terminalfinder

wechat

use wechat in alfred

https://github.com/MustangYM/WeChatExtension-ForMac

switch windows

switch windows like context

switch

https://github.com/mandrigin/AlfredSwitchWindows

hash

encode with hash md5 etc..

hash

https://github.com/willfarrell/alfred-hash-workflow

lorem

lorem words

lorem

https://www.packal.org/workflow/lorem-ipsum-0

httpstat

show website info

httpstat

https://github.com/leozhang2018/alfred-httpstat

tldr

show cheatsheet of command

tldr

https://github.com/cs1707/tldr-alfred

emoji

search emoji by word and content

emoji

https://github.com/sindresorhus/alfred-emoj

colors

show color

colros

http://www.packal.org/workflow/colors

devdocs

devdocs search,搜索体验可能比不上dash,但是开源免费。

devdocs

https://github.com/yannickglt/alfred-devdocs

ip

show current ip info

ip

https://github.com/zenorocha/alfred-workflows#ip-address-v120--download

vscode

open project in vscode

image

需要配置文件夹路径所在位置,可以通过设置变量方式实现 https://juejin.im/post/5d880368e51d4561c41fb906

translate

show tranlate result in alfred

translate

需要配合alfred-google-translate-config使用,国内请使用translate.cn,请关闭voice

设置`trc en&zh-CN`

复制通过`cmd c`

https://github.com/xfslove/alfred-google-translate

kill-process

命令行的方式杀死软件

kill-process

https://cloud.githubusercontent.com/assets/398893/14360276/6d2a33ba-fcaa-11e5-8fa5-4d3703a8129f.png

pkg-management

search pkg in alfred,支持多个平台比如npm等。

pkgman

https://github.com/willfarrell/alfred-pkgman-workflow

base64 string

base64

encode

https://github.com/willfarrell/alfred-encode-decode-workflow/raw/master/screenshots/encode.png

qrcode

qrcode

https://github.com/willfarrell/alfred-encode-decode-workflow/raw/master/screenshots/encode.png

  • `yn` - make `process.env.ENV_KEY = true` or `process.env.ENV_KEY = 1` is same meanings. env conditional check much easier.

`git cherry-pick beginning_commit^..ending_commit`

  1. beginning_commit is older commit
  2. if git cherry-pick failed, keep call git cherry-pick --continue

进入 `vim` 编辑界面之后,输入 `/` + 搜索关键词进行搜索。

use log::debug;

fn main() {
  env_logger::init();
  debug!(target: "tswc", "inputs {:?}", inputs);
}

`RUST_LOG=tswc cargo run`

`RUST_LOG=trace cargo test -- --nocapture`

use swc_core::ecma::{ast::Ident, visit::VisitMut};
use tracing::debug;

pub struct Whatplatform;

impl VisitMut for Whatplatform {
    // Implement necessary visit_mut_* methods for actual custom transform.
    // A comprehensive list of possible visitor methods can be found here:
    // https://rustdoc.swc.rs/swc_ecma_visit/trait.VisitMut.html
    fn visit_mut_ident(&mut self, n: &mut Ident) {
        debug!("Values: {:#?}", n);
    }
}

Use branch name

create branch named `hotfix/issue-<name-id>-anything`, after it merged will automatic close issue namd `name-id` in linear side.

e.g. `hotfix/issue-<jwx-159>-anything`

type Filter<T> = {
  [K in keyof T]: {
    fieldName: K;
    operator: "like" | "equal" | "notLike" | "notEqual";
    value: T[K];
  };
}[keyof T];

PS: 这段代码的写法的确比较十分新奇

it will looks like

const model = {
  stringProp: "str",
  hamburgerProp: 123,
  booleanProp: true
};

type FilterForModel = Filter<typeof model>;
/* type FilterForModel = {
    fieldName: "stringProp";
    operator: "like" | "equal" | "notLike" | "notEqual";
    value: string;
} | {
    fieldName: "hamburgerProp";
    operator: "like" | "equal" | "notLike" | "notEqual";
    value: number;
} | {
    fieldName: "booleanProp";
    operator: "like" | "equal" | "notLike" | "notEqual";
    value: boolean;
} */

refs: https://github.com/microsoft/TypeScript/issues/36444