Skip to content

Instantly share code, notes, and snippets.

@yimity
yimity / combine.sh
Created December 11, 2020 01:13 — forked from GuangTianLi/combine.sh
combine
#!/usr/bin/bash
echo "processing $1 and $2"
PNG0=$1 ## png0 <----- first image should be the BLACKEST
PNG1=$2 ## png1 <----- second image should be the WHITEST
#PNG2=$3 ## png2 <----- third - todo - this could be an opaque fg with tranparent bg
bg_size=`identify -format '%wx%h' "$1"`
#echo "bg is $bg_size"
magick convert $PNG1 -resize $bg_size $PNG1
magick convert $PNG0 -channel RGBA -matte -colorspace gray -normalize -ordered-dither o8x8 gray_$PNG0
magick convert $PNG1 -channel RGBA -matte -colorspace gray -normalize -ordered-dither o8x8 gray_$PNG1
@yimity
yimity / pod clean
Created March 12, 2020 03:28
pod clean and install
cd ios
rm -rf ./Pods ./Podfile.lokck
pod cache clean —all
pod install
@yimity
yimity / ng serve with proxy
Last active March 11, 2020 12:14
ng serve
ng serve --disableHostCheck=true --host=192.168.1.212 --proxy-config=proxy.conf.json --base-href '/phone/'
@yimity
yimity / disable-web-security
Created February 13, 2020 13:55
disable-web-security
open -a "Google Chrome" --args --disable-web-security --user-data-dir
open -a "Microsoft Edge" --args --disable-web-security --user-data-dir
@yimity
yimity / disable-low-volume
Created February 11, 2020 07:08
禁用 Mac QQ 开启视频其他媒体声音变低的功能
printf "p *(char*)(void(*)())AudioDeviceDuck=0xc3\nq" | lldb -n QQ